fix(core): update
This commit is contained in:
parent
b2f0b8fc3d
commit
6a8fca75c9
@ -18,8 +18,8 @@ export const uuid5 = (customStringArg: string, namespaceArg = plugins.uuid.v5.DN
|
||||
return plugins.uuid.v5(customStringArg, namespaceArg);
|
||||
};
|
||||
|
||||
export const uni = () => {
|
||||
return 'unixxxxxxxxxxx'.replace(/[xy]/g, c => {
|
||||
export const uni = (prefix: string = 'uni') => {
|
||||
return `${prefix}xxxxxxxxxxx`.replace(/[xy]/g, c => {
|
||||
const r = (Math.random() * 16) | 0;
|
||||
const v = c === 'x' ? r : (r & 0x3) | 0x8;
|
||||
return v.toString(16);
|
||||
|
Loading…
Reference in New Issue
Block a user