UNPKG

node-red-contrib-diode

Version:

A simple node to isolate the output of a node or function to that further processing cannot affect the original.

13 lines (11 loc) 339 B
module.exports = function(RED) { function diodeNode(config) { RED.nodes.createNode(this,config); var node = this; node.on('input', function(msg) { var newMsg = RED.util.cloneMessage(msg); node.send(newMsg); }); } RED.nodes.registerType("diode",diodeNode); }