Comparing version 5.0.6 to 5.0.7
#!/usr/bin/env node | ||
import { nanoid, customAlphabet } from '../index.js' | ||
import { customAlphabet, nanoid } from '../index.js' | ||
function print(msg) { | ||
@@ -4,0 +4,0 @@ process.stdout.write(msg + '\n') |
@@ -1,2 +0,2 @@ | ||
import { urlAlphabet } from './url-alphabet/index.js' | ||
import { urlAlphabet as scopedUrlAlphabet } from './url-alphabet/index.js' | ||
export { urlAlphabet } from './url-alphabet/index.js' | ||
@@ -25,5 +25,5 @@ export let random = bytes => crypto.getRandomValues(new Uint8Array(bytes)) | ||
while (size--) { | ||
id += urlAlphabet[bytes[size] & 63] | ||
id += scopedUrlAlphabet[bytes[size] & 63] | ||
} | ||
return id | ||
} |
import { webcrypto as crypto } from 'node:crypto' | ||
import { urlAlphabet } from './url-alphabet/index.js' | ||
export { urlAlphabet } | ||
import { urlAlphabet as scopedUrlAlphabet } from './url-alphabet/index.js' | ||
export { urlAlphabet } from './url-alphabet/index.js' | ||
const POOL_SIZE_MULTIPLIER = 128 | ||
@@ -43,5 +43,5 @@ let pool, poolOffset | ||
for (let i = poolOffset - size; i < poolOffset; i++) { | ||
id += urlAlphabet[pool[i] & 63] | ||
id += scopedUrlAlphabet[pool[i] & 63] | ||
} | ||
return id | ||
} |
{ | ||
"name": "nanoid", | ||
"version": "5.0.6", | ||
"version": "5.0.7", | ||
"description": "A tiny (116 bytes), secure URL-friendly unique string ID generator", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10942