nanoid
Advanced tools
Comparing version 3.1.27 to 3.1.28
@@ -70,2 +70,2 @@ let random = bytes => | ||
module.exports = { nanoid, customAlphabet, random } | ||
export { nanoid, customAlphabet, random } |
@@ -1,4 +0,4 @@ | ||
let crypto = require('crypto') | ||
import crypto from 'crypto' | ||
let { urlAlphabet } = require('../url-alphabet') | ||
import { urlAlphabet } from '../url-alphabet/index.js' | ||
@@ -71,2 +71,2 @@ // `crypto.randomFill()` is a little faster than `crypto.randomBytes()`, | ||
module.exports = { nanoid, customAlphabet, random } | ||
export { nanoid, customAlphabet, random } |
@@ -1,4 +0,4 @@ | ||
let { getRandomBytesAsync } = require('expo-random') | ||
import { getRandomBytesAsync } from 'expo-random' | ||
let { urlAlphabet } = require('../url-alphabet') | ||
import { urlAlphabet } from '../url-alphabet/index.js' | ||
@@ -57,2 +57,2 @@ let random = getRandomBytesAsync | ||
module.exports = { nanoid, customAlphabet, random } | ||
export { nanoid, customAlphabet, random } |
// This file replaces `index.js` in bundlers like webpack or Rollup, | ||
// according to `browser` config in `package.json`. | ||
let { urlAlphabet } = require('./url-alphabet') | ||
import { urlAlphabet } from './url-alphabet/index.js' | ||
@@ -104,2 +104,2 @@ if (process.env.NODE_ENV !== 'production') { | ||
module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random } | ||
export { nanoid, customAlphabet, customRandom, urlAlphabet, random } |
@@ -1,4 +0,4 @@ | ||
let crypto = require('crypto') | ||
import crypto from 'crypto' | ||
let { urlAlphabet } = require('./url-alphabet') | ||
import { urlAlphabet } from './url-alphabet/index.js' | ||
@@ -81,2 +81,2 @@ // It is best to make fewer, larger requests to the crypto module to | ||
module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random } | ||
export { nanoid, customAlphabet, customRandom, urlAlphabet, random } |
@@ -30,2 +30,2 @@ // This alphabet uses `A-Za-z0-9_-` symbols. The genetic algorithm helped | ||
module.exports = { nanoid, customAlphabet } | ||
export { nanoid, customAlphabet } |
{ | ||
"name": "nanoid", | ||
"version": "3.1.27", | ||
"version": "3.1.28", | ||
"description": "A tiny (108 bytes), secure URL-friendly unique string ID generator", | ||
@@ -20,10 +20,46 @@ "keywords": [ | ||
"./async/index.js": "./async/index.browser.js", | ||
"./async/index.cjs": "./async/index.browser.cjs" | ||
"./async/index.cjs": "./async/index.browser.cjs", | ||
"./index.cjs": "./index.browser.cjs" | ||
}, | ||
"react-native": { | ||
"./async/index.js": "./async/index.native.js" | ||
}, | ||
"react-native": "index.js", | ||
"bin": "./bin/nanoid.cjs", | ||
"sideEffects": false, | ||
"types": "./index.d.ts" | ||
} | ||
"types": "./index.d.ts", | ||
"type": "module", | ||
"main": "index.cjs", | ||
"module": "index.js", | ||
"exports": { | ||
".": { | ||
"browser": { | ||
"development": "./index.dev.js", | ||
"production": "./index.prod.js", | ||
"default": "./index.prod.js" | ||
}, | ||
"require": "./index.cjs", | ||
"import": "./index.js", | ||
"default": "./index.js", | ||
"types": "./index.d.ts" | ||
}, | ||
"./package.json": "./package.json", | ||
"./async/package.json": "./async/package.json", | ||
"./async": { | ||
"browser": "./async/index.browser.js", | ||
"require": "./async/index.cjs", | ||
"import": "./async/index.js", | ||
"default": "./async/index.js" | ||
}, | ||
"./non-secure/package.json": "./non-secure/package.json", | ||
"./non-secure": { | ||
"require": "./non-secure/index.cjs", | ||
"import": "./non-secure/index.js", | ||
"default": "./non-secure/index.js" | ||
}, | ||
"./url-alphabet/package.json": "./url-alphabet/package.json", | ||
"./url-alphabet": { | ||
"require": "./url-alphabet/index.cjs", | ||
"import": "./url-alphabet/index.js", | ||
"default": "./url-alphabet/index.js" | ||
}, | ||
"./index.d.ts": "./index.d.ts" | ||
} | ||
} |
@@ -6,2 +6,2 @@ // This alphabet uses `A-Za-z0-9_-` symbols. The genetic algorithm helped | ||
module.exports = { urlAlphabet } | ||
export { urlAlphabet } |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
26
1038
0
Yes
46576
3