release: WRNexusJS 0.4.0

This commit is contained in:
Clintchiz committed 2026-07-27 12:42:18 +05:30
1 parent 8b728a3e5d
commit 30e5721e84
250 files changed
+10065 -3923

No files matched your search

+2 -1
View File
@@ -1,7 +1,8 @@
const encoder = new TextEncoder();
export function defaultRandomBytes(length: number): Uint8Array {
if (!Number.isInteger(length) || length < 1) throw new RangeError("random byte length must be positive");
if (!Number.isInteger(length) || length < 1)
throw new RangeError("random byte length must be positive");
const bytes = new Uint8Array(length);
crypto.getRandomValues(bytes);
return bytes;