@universe/util
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -46,3 +46,3 @@ export declare const isNull: (v: unknown) => v is null; | ||
export declare const isUuid: (v: unknown) => v is string; | ||
export declare const uuid: () => string; | ||
export declare const uuid: any; | ||
export declare function base85UuidEncode(uuid: string): string; | ||
@@ -49,0 +49,0 @@ export declare function base85UuidDecode(data: string): string | null; |
@@ -93,3 +93,3 @@ "use strict"; | ||
}); | ||
it.only('converts posix to date', async () => { | ||
it('converts posix to date', async () => { | ||
const dates = [ | ||
@@ -111,2 +111,2 @@ '6/29/1991', | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90ZXN0L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEseUJBQXlCO0FBQ3pCLHlCQUF5QjtBQUN6Qiw2QkFBNkI7QUFFN0Isd0NBQXdLO0FBRXhLLGlDQUFpQztBQUVqQyxRQUFRLENBQUMsT0FBTyxFQUFFO0lBQ2hCLFFBQVEsQ0FBQyxpQkFBaUIsRUFBRTtRQUMxQixFQUFFLENBQUMsY0FBYyxFQUFFLEtBQUs7WUFDdEIsTUFBTSxLQUFLLEdBQUcsSUFBSSxDQUFDLEdBQUcsRUFBRSxDQUFDO1lBQ3pCLElBQUksTUFBTSxHQUFHLENBQUMsQ0FBQztZQUNmLE1BQU0sZ0JBQVEsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxNQUFNLEdBQUcsSUFBSSxDQUFDLEdBQUcsRUFBRSxFQUFFLElBQUksQ0FBQyxFQUFFLENBQUM7WUFDbEQsTUFBTSxDQUFDLEVBQUUsQ0FBQyxNQUFNLEdBQUcsS0FBSyxJQUFJLElBQUksQ0FBQyxDQUFDO1FBQ3BDLENBQUMsQ0FBQyxDQUFDO1FBQ0gsRUFBRSxDQUFDLDZCQUE2QixFQUFFL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7XG4iXX0= |
{ | ||
"name": "@universe/util", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"main": "dist/src/index.js", | ||
@@ -5,0 +5,0 @@ "description": "Universe development utilities.", |
@@ -61,3 +61,7 @@ /* global MessageChannel */ | ||
const atob = IS_BROWSER ? window.atob : (str: string) => Buffer.from(str, 'base64').toString('utf8'); | ||
/* eslint-disable-next-line @typescript-eslint/no-var-requires */ | ||
const crypto = IS_BROWSER ? window.crypto : require('crypto'); | ||
/* eslint-disable-next-line @typescript-eslint/no-var-requires */ | ||
const rand = IS_BROWSER ? window.crypto.getRandomValues.bind(window.crypto) : require('crypto').randomFillSync; | ||
@@ -67,5 +71,6 @@ | ||
const uuidValidator = /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i; | ||
const TMPL_UUID = ('' + 1e7 + -1e3 + -4e3 + -8e3 + -1e11); | ||
export const NIL_UUID = '00000000-0000-0000-0000-000000000000'; | ||
export const isUuid = (v: unknown): v is string => isString(v) && (v === NIL_UUID || uuidValidator.test(v)); | ||
export const uuid = (): string => ('' + 1e7 + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c => (+c ^ rand(new Uint8Array(1))[0] & 15 >> +c / 4).toString(16)); | ||
export const uuid = crypto?.randomUUID || ((): string => TMPL_UUID.replace(/[018]/g, c => (+c ^ rand(new Uint8Array(1))[0] & 15 >> +c / 4).toString(16))); | ||
@@ -72,0 +77,0 @@ // Encodes a uuid4 into Base85 for size savings. |
@@ -101,3 +101,3 @@ /* global describe, it */ | ||
it.only('converts posix to date', async() => { | ||
it('converts posix to date', async() => { | ||
const dates = [ | ||
@@ -104,0 +104,0 @@ '6/29/1991', |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
443044
1160