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

node-red-contrib-cool-loop

v0.0.3

Published

A Node-RED node to create a loop in a flow.

Downloads

43

Readme

node-red-contrib-cool-loop

Custom nodes for Node-RED that implement a continuous loop for processing arrays of elements.

Description

The node-red-contrib-cool-loop package provides two nodes for Node-RED: cool-loop-start and cool-loop-join. These nodes work together to process an array of elements one by one through a user-defined flow, using events to coordinate continuous execution.

Installation

To install this package in your Node-RED instance, navigate to your Node-RED project directory and run the following command:

cd ~/.node-red
npm install node-red-contrib-cool-loop

Then, restart Node-RED for the new nodes to appear in the palette.

Usage

cool-loop-start Node

The cool-loop-start node initiates the processing of an array and sends elements one by one. This node expects an array in msg.payload (or a specified property) and sends each element through the flow.

Configuration

  • Name: Optional name for the node.
  • Array Property: Name of the message property that contains the array to process (default is payload).

Example Usage

  1. Drag an inject node and configure it with an array in msg.payload.
  2. Connect the inject node to the cool-loop-start node.
  3. Configure the cool-loop-start node to use msg.payload as the array property.
  4. Connect the output of the cool-loop-start node to your processing flow.

cool-loop-join Node

The cool-loop-join node receives the processed elements and decides whether to continue sending more elements from the cool-loop-start node or to end the loop.

Important: _msgid and msg.done are absolutely necessary, please do not overwrite them.

Example Usage

  1. Connect the end of your processing flow to the cool-loop-join node.
  2. Configure the cool-loop-join node with the ID of the corresponding cool-loop-start node.
  3. Adjust the delay as needed.

Complete Example

[Inject] -> [Cool Loop Start] -> [Your Processing Flow] -> [Cool Loop Join]

Contributions

Contributions are welcome. To contribute, please follow these steps:

  1. Fork the repository.
  2. Create a branch for your feature (git checkout -b feature/new-feature).
  3. Make your changes and commit them (git commit -am 'Add new feature').
  4. Push to the branch (git push origin feature/new-feature).
  5. Open a Pull Request.

License

This project is licensed under the MIT License

Author

Your Name
Email: [email protected]


Thank you for using node-red-contrib-cool-loop! If you have any questions or suggestions, feel free to contact me.