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

Added first files
This commit is contained in:
Andrey Kernichniy 2026-03-13 00:32:06 +07:00
parent 3be22f1023
commit aad2fe13e7
29 changed files with 5020 additions and 8 deletions

10
lib/src/web-api/uuidv4.ts Normal file
View file

@ -0,0 +1,10 @@
export const uuidv4 = () => {
if (crypto.randomUUID == null) {
"10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) =>
// eslint-disable-next-line no-bitwise
(+c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (+c / 4)))).toString(16),
);
} else {
return crypto.randomUUID();
}
};