npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mschaeffler/node-red-debounce

v1.1.1

Published

Node Red nodes to debounce a payload.

Downloads

39

Readme

@mschaeffler/node-red-debounce

Node Red nodes for debouncing data.

image of example flow

Install

$ npm install @mschaeffler/node-red-debounce

debounce

The debounce node is for a general purpose debouncing of any data (string, boolean, number ...):

  • What data is debounced can be selected with the property property.
  • filter: The data can be checked for a change before the debounce.
  • Debouncing means here that the node waits time time before sending out the last received message.
  • It can be changed from debouncing to blocking mode.

Input

|msg. | type | description | |:-------|:-------|:----------------------------------| |topic | string | name of the input channel. | |payload | | input value for topic. | |invalid |boolean | if true, this message is ignored. | |reset |boolean | if true, resets the node; if combined with a topic, only this topic is reseted.|

Output

|msg. | type | description | |:-------|:-------|:----------------------------------| |topic | string | same is in corresponding input message.| |payload | | data evaluated out of the input message.|

Parameters

|config| type | description | |:-----|:-------|:----------------------------------| |Property| string | defines the message property to be used as payload.| |Time | number | debouncing time.| |Block |boolean | block instead of decounce. this means that an incoming message is sent out immediately and afterwards for time all following messages are blocked| |Filter |boolean | shall messages received with unchanged data be ignored.| |Restart |boolean | shall the debouncing time be restarted with every received message.| |byTopic |boolean | shall resending be done on a topic base.| |Status |boolean |shows the actual value as a node status.|

debounce N

The debounce N node is for debouncing of numerical values:

  • What data is debounced can be selected with the property property.
  • filter: The value can be checked for a change greater then before the debounce.
  • This threshold can be an absolute or a relative value.
  • Debouncing means here that the node waits time time before sending out the last received message.

Input

|msg. | type | description | |:-------|:-------|:----------------------------------| |topic | string | name of the input channel. | |payload | | input value for topic. | |invalid |boolean | if true, this message is ignored. | |reset |boolean | if true, resets the node; if combined with a topic, only this topic is reseted.|

Output

|msg. | type | description | |:-------|:-------|:----------------------------------| |topic | string | same is in corresponding input message.| |payload | number | data evaluated out of the input message.|

Parameters

|config| type | description | |:-----|:-------|:----------------------------------| |Property| string | defines the message property to be used as payload.| |Time | number | debouncing time.| |Filter | number | data must differ at least by this value; it can be an absolute number or a percentage.| |Restart |boolean | shall the debouncing time be restarted with every received message.| |byTopic |boolean | shall resending be done on a topic base.| |Status |boolean | shows the actual value as a node status.|

Example Flow

example flow

Author

Mathias Schäffler

License

LGPL-2.1