node-red-contrib-loop-processing 0.4.0

Node-RED nodes to help flow looping.

npm install node-red-contrib-loop-processing

Node-RED nodes to help a flow looping.

Description

This module has 3 nodes.

counter-loop

Using a counter variable, a flow loops like a for-loop.

Set the following inputs:

  • property using as the counter variable
  • initial value
  • terminal value (and operator)
  • increment value

If the conditions is true, a flow is sent to the lower output port ('true' outputLabel).
If false, the flow is sent to the upper output port ('false' outputLabel).

When the flow exits the loop, the counter variable can reset by setting to null, undefined or empty string. This is useful for creating a multi-loop.

counter-loop

array-loop

Until the end of an array, a flow loops. This node is similar to forEach or for-of, but this node cannot handle an associated array.

Set the following inputs:

  • property using as the key variable
  • array

If the conditions is true, a flow is sent to the lower output port.
If false, the flow is sent to the upper output port ('end loop' outputLabel).

When the flow exits the loop, the key variable can reset by setting to null, undefined or empty string. This is useful for creating a multi-loop.

array-loop

while-loop

since 0.2.0

Using a condition expression, a flow loops like a while loop.

If the expression is true, a flow is sent to the lower output port ('true' outputLabel).
If false, the flow is sent to the upper output port ('false' outputLabel).

while-loop

Usage

Example flow is in examples/exmple.json.

Drag & drop in your Node-RED editor.

Install

NPM

Changelog

Changelog

Licence

Apache-2.0

Author

s1r-J

Node Info

Version: 0.4.0
Updated 7 months, 3 weeks ago
License: Apache-2.0
Rating: 5.0 1

Downloads

145 in the last day
829 in the last week
3838 in the last month

Nodes

  • counter-loop
  • array-loop
  • while-loop

Keywords

  • node-red
  • loop
  • repeat
  • iterator
  • array

Maintainers