From 6a8fca75c918b14528df24c5d3b69eb84a8987da Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Thu, 5 Mar 2020 20:41:15 +0000 Subject: [PATCH] fix(core): update --- ts/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/index.ts b/ts/index.ts index ad81400..9a2eee0 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -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);