mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Change node id generation to give fixed length values without '.'
This commit is contained in:
@@ -210,8 +210,11 @@ RED.nodes = (function() {
|
||||
})();
|
||||
|
||||
function getID() {
|
||||
// return Math.floor(Math.random()*15728640 + 1048576).toString(16)
|
||||
return (1+Math.random()*4294967295).toString(16);
|
||||
var bytes = [];
|
||||
for (var i=0;i<8;i++) {
|
||||
bytes.push(Math.round(0xff*Math.random()).toString(16).padStart(2,'0'));
|
||||
}
|
||||
return bytes.join("");
|
||||
}
|
||||
|
||||
function parseNodePropertyTypeString(typeString) {
|
||||
|
Reference in New Issue
Block a user