Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nanoid

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nanoid - npm Package Compare versions

Comparing version 5.0.6 to 5.0.7

2

bin/nanoid.js
#!/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": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc