Release package version 1.0.1
All checks were successful
CI / build (push) Successful in 33s

Added type for uuidv4
This commit is contained in:
Andrey Kernichniy 2026-03-14 14:03:10 +07:00
parent aad2fe13e7
commit 0d1df855a3
2 changed files with 4 additions and 2 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "@gxc-solutions/lett-js", "name": "@gxc-solutions/lett-js",
"version": "1.0.0", "version": "1.0.1",
"main": "index.js", "main": "index.js",
"author": "GXC Solutions", "author": "GXC Solutions",
"publishConfig": { "publishConfig": {

View file

@ -1,4 +1,6 @@
export const uuidv4 = () => { export type UUID_V4 = `${string}-${string}-${string}-${string}-${string}`;
export const uuidv4 = (): UUID_V4 => {
if (crypto.randomUUID == null) { if (crypto.randomUUID == null) {
"10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) =>
// eslint-disable-next-line no-bitwise // eslint-disable-next-line no-bitwise