Allow caller to supply custom prefix to genUuid
This commit is contained in:
parent
f7dec50a70
commit
d256163d59
|
@ -50,7 +50,7 @@ module.exports.bootModule = Ground.bootModule;
|
|||
|
||||
// These aren't so much "Universal" as they are "VM-wide-unique".
|
||||
let uuidIndex = 0;
|
||||
let uuidPrefix = '__@syndicate__' + RandomID.randomId(8) + '_';
|
||||
module.exports.genUuid = function () {
|
||||
return uuidPrefix + uuidIndex++;
|
||||
let uuidPrefix = '__@syndicate__' + RandomID.randomId(8);
|
||||
module.exports.genUuid = function (prefix) {
|
||||
return (prefix || uuidPrefix) + '_' + uuidIndex++;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue