fix(core): update

This commit is contained in:
2020-06-05 09:11:48 +00:00
parent 328fccc086
commit 3448b8cf97
4 changed files with 49 additions and 42 deletions

View File

@ -18,10 +18,4 @@ export const uuid5 = (customStringArg: string, namespaceArg = plugins.uuid.v5.DN
return plugins.uuid.v5(customStringArg, namespaceArg);
};
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);
});
};
export const uni = plugins.isounique.uni;

View File

@ -1,3 +1,10 @@
// pushrocks scope
import * as isounique from '@pushrocks/isounique';
export {
isounique
};
import shortid from 'shortid';
import * as uuid from 'uuid';