diff --git a/red/runtime/nodes/flows/Flow.js b/red/runtime/nodes/flows/Flow.js index cc35355f3..c85495071 100644 --- a/red/runtime/nodes/flows/Flow.js +++ b/red/runtime/nodes/flows/Flow.js @@ -227,11 +227,6 @@ function Flow(global,flow) { } - -function getID() { - return (1+Math.random()*4294967295).toString(16); -} - var EnvVarPropertyRE = /^\$\((\S+)\)$/; function mapEnvVarProperties(obj,prop) { @@ -297,7 +292,7 @@ function createSubflow(sf,sfn,subflows,globalSubflows,activeNodes) { var createNodeInSubflow = function(def) { node = clone(def); - var nid = getID(); + var nid = redUtil.generateId(); node_map[node.id] = node; node._alias = node.id; node.id = nid; diff --git a/red/runtime/nodes/registry/loader.js b/red/runtime/nodes/registry/loader.js index 1dfe2906f..cf7a690df 100644 --- a/red/runtime/nodes/registry/loader.js +++ b/red/runtime/nodes/registry/loader.js @@ -238,6 +238,21 @@ function loadNodeSet(node) { if (RED.hasOwnProperty(i) && !/^(init|start|stop)$/.test(i)) { var propDescriptor = Object.getOwnPropertyDescriptor(RED,i); Object.defineProperty(red,i,propDescriptor); + if (typeof RED[i] === 'function') { + console.log(i+"()"); + } else { + for (var j in RED[i]) { + if (typeof RED[i][j] === 'function') { + console.log(i+"."+j+"()"); + } else if (typeof RED[i][j] === 'number') { + console.log(i+"."+j+" #"); + } else if (typeof RED[i][j] === 'string') { + console.log(i+"."+j+" $"); + } else { + console.log(i+"."+j+" "+typeof RED[i][j]); + } + } + } } } red["_"] = function() {