A collection of Node-RED nodes that use FRP to perform stream manipulation.
This node maps msg.payload
using the specified mapping function.
payload
: Data inside the incoming message. Can be renamed to any variable name you prefer in the mapping function
payload
: Value returned by the node's mapping function.topic
: A mandatory property used to identify the origin of a message. This is used by the combine nodes to process multiple inputs, and should not contain spaces or periods.
The frp-map
node allows you to define the body of the internal mappingFunction
. Naming the function is not necessary as it is already defined internally. The mapping function can only contain one input parameter and is required to return a value, which is stored in the message's payload
.
This node allows incoming messages to pass through if it fulfills the criteria specified in the filtering function.
payload
: Data insidemsg.payload
of the incoming message. Can be renamed to any variable name you prefer in the filtering function.
topic
: A mandatory property used to identify the origin of a message. This is used by the combine nodes to process multiple inputs, and should not contain spaces or periods.
The frp-filter
node allows you to define the body of the internal filteringFunction
. Naming the function is not necessary as it is already defined internally.
The filtering function discerns if the data inside the message (contained in msg.payload
) passes a certain criteria. Therefore, the function should have one input parameter and return either true
or false
. It's also important to note that frp-filter
does not change the contents of the message, and only decides whether or not to pass it along.
This node performs a fold operation for every incoming message: it takes the value of msg.payload
and runs it through the accumulator function, storing and returning an accumulated value from the first to the latest input.
payload
: The initial value used for accumulation.payload
: Data insidemsg.payload
of the incoming message. Can be renamed to any variable name you prefer in the accumulator function.accumulatedValue
: Value obtained from computing the previous message with the accumulator function. Can be renamed to any variable name you prefer in the accumulator function.
payload
: Contains the accumulated value obtained from the accumulator function.topic
: A mandatory property used to identify the origin of a message. This is used by the combine nodes to process multiple inputs, and should not contain spaces or periods.
frp-scan
requires you to define the body of the internal accumulatorFunction
. Naming the function is not necessary as it is already defined internally. The accumulator function must have two parameters: the first being accumultedValue
, followed by payload
. For the very first run, the seed value
serves as the accumulated value, and the result is then stored and used for subsequent runs. This function must therefore return a value in order for it to work properly.
This node combines the msg.payload
's of its inputs into an array and outputs it.
input topics
: A list containing the topics of the input nodes that can be reordered.
payload
: Contains the accumulated value obtained from the accumulator function.topic
: A mandatory property used to identify the origin of a message. This is used by the combine nodes to process multiple inputs, and should not contain spaces or periods.
This node combines the msg.payload
's of its inputs into an array and outputs it.
input topics
: A list containing the topics of the input nodes that can be reordered.payload1, payload2, ...
: Data contained in themsg.payload
's of the input nodes. Their order should be the same as that ofinput topics
payload
: Contains the accumulated value obtained from the accumulator function.topic
: A mandatory property used to identify the origin of a message. This is used by the combine nodes to process multiple inputs, and should not contain spaces or periods.
frp-combineWith
requires you to define the body of the internal aggregateFunction
. Naming the function is not necessary as it is already defined internally. The aggregator function must have as many parameters as there are input topics, and must observe the correct order. It must also return a value for it to work properly.