Socket
Book a DemoInstallSign in
Socket

node-red-contrib-diode

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-diode

A simple node to isolate input from output

npmnpm
Version
0.1.0
Version published
Weekly downloads
30
328.57%
Maintainers
1
Weekly downloads
 
Created
Source

node-red-contrib-diode

A Node Red node to isolate output from input. As messages are normally passed by REFERENCE, there may be times when you want to ensure that any changes you make to the output are not reflected back to the input. This node will do that for you by making a copy of your message and passing it on.

Of course, passing an object by value uses up slightly more resources than passing by reference so depending on your objects and resources you might not wish to go TOO wild with this?

Oh and you'd want this for what reason? Should you use node-send to two outputs - and the first one passes onto a node that ALTERS say msg.payload - then your second output could find itself ALTERED! Attaching this node to the output in these circumstances could prevent such interference.

See http://tech.scargill.net/saturday-node-red-sermon for where this came from and why I created it thanks to feedback from blog readers and of course Dave CJ of Node-Red fame.

Keywords

diode

FAQs

Package last updated on 26 Jun 2017

Did you know?

Socket

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.

Install

Related posts