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:
@@ -31,7 +31,11 @@ const util = require("util");
|
||||
* @memberof @node-red/util_util
|
||||
*/
|
||||
function generateId() {
|
||||
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("");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user