fix(core): update
This commit is contained in:
parent
4516a1e8ba
commit
d5438aaaab
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartunique',
|
||||
version: '3.0.6',
|
||||
version: '3.0.7',
|
||||
description: 'make things unique'
|
||||
}
|
||||
|
@ -25,3 +25,11 @@ export const uni = (prefix: string = 'uni') => {
|
||||
return v.toString(16);
|
||||
})}`;
|
||||
};
|
||||
|
||||
export const uniSimple = (prefix: string = 'uni') => {
|
||||
return `${prefix}${`xxxxxxxxxxxxxxxxxxxxxxxx`.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