Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var red = {}
for (var i in RED) {
if (RED.hasOwnProperty(i) && !/^(init|start|stop)$/.test(i)) {
var propDescriptor = Object.getOwnPropertyDescriptor(RED, i)
Object.defineProperty(red, i, propDescriptor)
}
}
red['_'] = function (messageId) {
return messageId
}
redNodes.init({settings: settings, storage: storage, log: log})
credentials.init(storage, express())
RED.nodes.registerType('helper', helperNode)
if (Array.isArray(testNode)) {
for (var n = 0; n < testNode.length; n++) {
testNode[n](red)
}
} else {
testNode(red)
}
flows.load().then(function () {
flows.startFlows()
should.deepEqual(testFlows, flows.getFlows())
cb()
})
},
unload: function () {
function helperNode (n) {
RED.nodes.createNode(this, n)
}