
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
node-red-contrib-sequence-functions
Advanced tools
Sequence processing function Node-RED nodes including map, reduce and filter.
There are 5 nodes in this project.
capture node ... Capture a message and append it into an array, emit the array with the given trigger conditionsstats node ... Provide statistical processing function applied to an array in msg.payloadmap node ... Provide map function applied to an array in msg.payloadreduce node ... Provide reduce function applied to an array in msg.payloadfilter node ... Provide filter function applied to an array in msg.payloadEach node handles and manipulates an array in msg.payload.
You can use existing split node and function node in conjunction with the above nodes in order to process a sequence of messages.
cd ~/.node-red
npm install node-red-contrib-sequence-functions
You can try the following flow for testing the node behaviors after installing this project.
[
{
"id": "8cefb4ce.83e7c",
"type": "tab",
"label": "seuqence-processing example"
},
{
"id": "5d92a885.d883",
"type": "inject",
"z": "8cefb4ce.83e7c",
"name": "value = 1",
"topic": "",
"payload": "1",
"payloadType": "num",
"repeat": "",
"crontab": "",
"once": false,
"x": 100,
"y": 120,
"wires": [
[
"7797567f.19dad8"
]
]
},
{
"id": "702dfed0.306c38",
"type": "inject",
"z": "8cefb4ce.83e7c",
"name": "value = 2.5",
"topic": "",
"payload": "2.5",
"payloadType": "num",
"repeat": "",
"crontab": "",
"once": false,
"x": 100,
"y": 160,
"wires": [
[
"7797567f.19dad8"
]
]
},
{
"id": "d2559185.9c8548",
"type": "inject",
"z": "8cefb4ce.83e7c",
"name": "value = 8.9",
"topic": "",
"payload": "8.9",
"payloadType": "num",
"repeat": "",
"crontab": "",
"once": false,
"x": 100,
"y": 240,
"wires": [
[
"7797567f.19dad8"
]
]
},
{
"id": "7797567f.19dad8",
"type": "capture",
"z": "8cefb4ce.83e7c",
"name": "",
"size": 10,
"period": 30,
"interval": "5",
"onNewMessage": false,
"x": 320,
"y": 160,
"wires": [
[
"f3dc3dd5.38d06",
"ce0e161c.9552d"
]
]
},
{
"id": "f3dc3dd5.38d06",
"type": "map",
"z": "8cefb4ce.83e7c",
"name": "map: value = value * 2",
"topic": "",
"valueProperty": "payload",
"readFromProperty": true,
"mapFunctionExpr": "x * 2",
"x": 340,
"y": 240,
"wires": [
[
"3ca5b242.4e56ce",
"7a815652.6ccf4"
]
]
},
{
"id": "3ca5b242.4e56ce",
"type": "filter",
"z": "8cefb4ce.83e7c",
"name": "filter: < 10",
"topic": "",
"rules": [
{
"t": "lt",
"v": "10",
"vt": "num"
}
],
"checkall": "true",
"x": 320,
"y": 320,
"wires": [
[
"31ba0b3d.32e42c",
"5615b429.0884ec",
"9dbf1b97.4b7b6"
]
]
},
{
"id": "31ba0b3d.32e42c",
"type": "stats",
"z": "8cefb4ce.83e7c",
"name": "",
"topic": "",
"statsFunction": "sum",
"x": 320,
"y": 480,
"wires": [
[
"57b288a9.608718"
]
]
},
{
"id": "5615b429.0884ec",
"type": "reduce",
"z": "8cefb4ce.83e7c",
"name": "reduce: x - a",
"topic": "",
"reduceFunctionExpr": "x - a",
"reduceRight": false,
"x": 330,
"y": 400,
"wires": [
[
"3b1affad.3cc338"
]
]
},
{
"id": "ce0e161c.9552d",
"type": "debug",
"z": "8cefb4ce.83e7c",
"name": "capture result",
"active": false,
"console": "false",
"complete": "payload",
"x": 580,
"y": 160,
"wires": []
},
{
"id": "7a815652.6ccf4",
"type": "debug",
"z": "8cefb4ce.83e7c",
"name": "map result",
"active": false,
"console": "false",
"complete": "payload",
"x": 570,
"y": 240,
"wires": []
},
{
"id": "9dbf1b97.4b7b6",
"type": "debug",
"z": "8cefb4ce.83e7c",
"name": "filter result",
"active": false,
"console": "false",
"complete": "payload",
"x": 570,
"y": 320,
"wires": []
},
{
"id": "3b1affad.3cc338",
"type": "debug",
"z": "8cefb4ce.83e7c",
"name": "reduce result",
"active": false,
"console": "false",
"complete": "payload",
"x": 570,
"y": 400,
"wires": []
},
{
"id": "57b288a9.608718",
"type": "debug",
"z": "8cefb4ce.83e7c",
"name": "stats result",
"active": true,
"console": "false",
"complete": "payload",
"x": 570,
"y": 480,
"wires": []
},
{
"id": "5f2902ae.f4c61c",
"type": "inject",
"z": "8cefb4ce.83e7c",
"name": "reset",
"topic": "clear",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"x": 90,
"y": 280,
"wires": [
[
"7797567f.19dad8"
]
]
},
{
"id": "f8b5e4f5.463708",
"type": "inject",
"z": "8cefb4ce.83e7c",
"name": "emit",
"topic": "capture",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"x": 90,
"y": 320,
"wires": [
[
"7797567f.19dad8"
]
]
},
{
"id": "13af9743.c07731",
"type": "inject",
"z": "8cefb4ce.83e7c",
"name": "value = 4.9",
"topic": "",
"payload": "4.9",
"payloadType": "num",
"repeat": "",
"crontab": "",
"once": false,
"x": 100,
"y": 200,
"wires": [
[
"7797567f.19dad8"
]
]
},
{
"id": "893a9b52.54ed",
"type": "comment",
"z": "8cefb4ce.83e7c",
"name": "Click the following inject nodes to generate a message sequence",
"info": "",
"x": 230,
"y": 80,
"wires": []
}
]
1.1.3
1.1.2
1.1.1
1.1.0
Convert to String into map node, which enables to convert the map function result into String1.0.0
FAQs
Node-RED nodes for sequence processing functions
We found that node-red-contrib-sequence-functions demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.