nanoid 3.1.26 → 3.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of nanoid might be problematic. Click here for more details.

@@ -1,70 +0,0 @@
1
- let random = bytes =>
2
- Promise.resolve(crypto.getRandomValues(new Uint8Array(bytes)))
3
-
4
- let customAlphabet = (alphabet, size) => {
5
- // First, a bitmask is necessary to generate the ID. The bitmask makes bytes
6
- // values closer to the alphabet size. The bitmask calculates the closest
7
- // `2^31 - 1` number, which exceeds the alphabet size.
8
- // For example, the bitmask for the alphabet size 30 is 31 (00011111).
9
- // `Math.clz32` is not used, because it is not available in browsers.
10
- let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
11
- // Though, the bitmask solution is not perfect since the bytes exceeding
12
- // the alphabet size are refused. Therefore, to reliably generate the ID,
13
- // the random bytes redundancy has to be satisfied.
14
-
15
- // Note: every hardware random generator call is performance expensive,
16
- // because the system call for entropy collection takes a lot of time.
17
- // So, to avoid additional system calls, extra bytes are requested in advance.
18
-
19
- // Next, a step determines how many random bytes to generate.
20
- // The number of random bytes gets decided upon the ID size, mask,
21
- // alphabet size, and magic number 1.6 (using 1.6 peaks at performance
22
- // according to benchmarks).
23
-
24
- // `-~f => Math.ceil(f)` if f is a float
25
- // `-~i => i + 1` if i is an integer
26
- let step = -~((1.6 * mask * size) / alphabet.length)
27
-
28
- return () => {
29
- let id = ''
30
- while (true) {
31
- let bytes = crypto.getRandomValues(new Uint8Array(step))
32
- // A compact alternative for `for (var i = 0; i < step; i++)`.
33
- let i = step
34
- while (i--) {
35
- // Adding `|| ''` refuses a random byte that exceeds the alphabet size.
36
- id += alphabet[bytes[i] & mask] || ''
37
- if (id.length === size) return Promise.resolve(id)
38
- }
39
- }
40
- }
41
- }
42
-
43
- let nanoid = (size = 21) => {
44
- let id = ''
45
- let bytes = crypto.getRandomValues(new Uint8Array(size))
46
-
47
- // A compact alternative for `for (var i = 0; i < step; i++)`.
48
- while (size--) {
49
- // It is incorrect to use bytes exceeding the alphabet size.
50
- // The following mask reduces the random byte in the 0-255 value
51
- // range to the 0-63 value range. Therefore, adding hacks, such
52
- // as empty string fallback or magic numbers, is unneccessary because
53
- // the bitmask trims bytes down to the alphabet size.
54
- let byte = bytes[size] & 63
55
- if (byte < 36) {
56
- // `0-9a-z`
57
- id += byte.toString(36)
58
- } else if (byte < 62) {
59
- // `A-Z`
60
- id += (byte - 26).toString(36).toUpperCase()
61
- } else if (byte < 63) {
62
- id += '_'
63
- } else {
64
- id += '-'
65
- }
66
- }
67
- return Promise.resolve(id)
68
- }
69
-
70
- module.exports = { nanoid, customAlphabet, random }
package/async/index.cjs DELETED
@@ -1,71 +0,0 @@
1
- let crypto = require('crypto')
2
-
3
- let { urlAlphabet } = require('../url-alphabet/index.cjs')
4
-
5
- // `crypto.randomFill()` is a little faster than `crypto.randomBytes()`,
6
- // because it is possible to use in combination with `Buffer.allocUnsafe()`.
7
- let random = bytes =>
8
- new Promise((resolve, reject) => {
9
- // `Buffer.allocUnsafe()` is faster because it doesn’t flush the memory.
10
- // Memory flushing is unnecessary since the buffer allocation itself resets
11
- // the memory with the new bytes.
12
- crypto.randomFill(Buffer.allocUnsafe(bytes), (err, buf) => {
13
- if (err) {
14
- reject(err)
15
- } else {
16
- resolve(buf)
17
- }
18
- })
19
- })
20
-
21
- let customAlphabet = (alphabet, size) => {
22
- // First, a bitmask is necessary to generate the ID. The bitmask makes bytes
23
- // values closer to the alphabet size. The bitmask calculates the closest
24
- // `2^31 - 1` number, which exceeds the alphabet size.
25
- // For example, the bitmask for the alphabet size 30 is 31 (00011111).
26
- let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
27
- // Though, the bitmask solution is not perfect since the bytes exceeding
28
- // the alphabet size are refused. Therefore, to reliably generate the ID,
29
- // the random bytes redundancy has to be satisfied.
30
-
31
- // Note: every hardware random generator call is performance expensive,
32
- // because the system call for entropy collection takes a lot of time.
33
- // So, to avoid additional system calls, extra bytes are requested in advance.
34
-
35
- // Next, a step determines how many random bytes to generate.
36
- // The number of random bytes gets decided upon the ID size, mask,
37
- // alphabet size, and magic number 1.6 (using 1.6 peaks at performance
38
- // according to benchmarks).
39
- let step = Math.ceil((1.6 * mask * size) / alphabet.length)
40
-
41
- let tick = id =>
42
- random(step).then(bytes => {
43
- // A compact alternative for `for (var i = 0; i < step; i++)`.
44
- let i = step
45
- while (i--) {
46
- // Adding `|| ''` refuses a random byte that exceeds the alphabet size.
47
- id += alphabet[bytes[i] & mask] || ''
48
- if (id.length === size) return id
49
- }
50
- return tick(id)
51
- })
52
-
53
- return () => tick('')
54
- }
55
-
56
- let nanoid = (size = 21) =>
57
- random(size).then(bytes => {
58
- let id = ''
59
- // A compact alternative for `for (var i = 0; i < step; i++)`.
60
- while (size--) {
61
- // It is incorrect to use bytes exceeding the alphabet size.
62
- // The following mask reduces the random byte in the 0-255 value
63
- // range to the 0-63 value range. Therefore, adding hacks, such
64
- // as empty string fallback or magic numbers, is unneccessary because
65
- // the bitmask trims bytes down to the alphabet size.
66
- id += urlAlphabet[bytes[size] & 63]
67
- }
68
- return id
69
- })
70
-
71
- module.exports = { nanoid, customAlphabet, random }
@@ -1,12 +0,0 @@
1
- {
2
- "type": "module",
3
- "main": "index.cjs",
4
- "module": "index.js",
5
- "react-native": {
6
- "./index.js": "./index.native.js"
7
- },
8
- "browser": {
9
- "./index.js": "./index.browser.js",
10
- "./index.cjs": "./index.browser.cjs"
11
- }
12
- }
package/index.browser.cjs DELETED
@@ -1,104 +0,0 @@
1
- // This file replaces `index.js` in bundlers like webpack or Rollup,
2
- // according to `browser` config in `package.json`.
3
-
4
- let { urlAlphabet } = require('./url-alphabet/index.cjs')
5
-
6
- if (process.env.NODE_ENV !== 'production') {
7
- // All bundlers will remove this block in the production bundle.
8
- if (
9
- typeof navigator !== 'undefined' &&
10
- navigator.product === 'ReactNative' &&
11
- typeof crypto === 'undefined'
12
- ) {
13
- throw new Error(
14
- 'React Native does not have a built-in secure random generator. ' +
15
- 'If you don’t need unpredictable IDs use `nanoid/non-secure`. ' +
16
- 'For secure IDs, import `react-native-get-random-values` ' +
17
- 'before Nano ID.'
18
- )
19
- }
20
- if (typeof msCrypto !== 'undefined' && typeof crypto === 'undefined') {
21
- throw new Error(
22
- 'Import file with `if (!window.crypto) window.crypto = window.msCrypto`' +
23
- ' before importing Nano ID to fix IE 11 support'
24
- )
25
- }
26
- if (typeof crypto === 'undefined') {
27
- throw new Error(
28
- 'Your browser does not have secure random generator. ' +
29
- 'If you don’t need unpredictable IDs, you can use nanoid/non-secure.'
30
- )
31
- }
32
- }
33
-
34
- let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))
35
-
36
- let customRandom = (alphabet, size, getRandom) => {
37
- // First, a bitmask is necessary to generate the ID. The bitmask makes bytes
38
- // values closer to the alphabet size. The bitmask calculates the closest
39
- // `2^31 - 1` number, which exceeds the alphabet size.
40
- // For example, the bitmask for the alphabet size 30 is 31 (00011111).
41
- // `Math.clz32` is not used, because it is not available in browsers.
42
- let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
43
- // Though, the bitmask solution is not perfect since the bytes exceeding
44
- // the alphabet size are refused. Therefore, to reliably generate the ID,
45
- // the random bytes redundancy has to be satisfied.
46
-
47
- // Note: every hardware random generator call is performance expensive,
48
- // because the system call for entropy collection takes a lot of time.
49
- // So, to avoid additional system calls, extra bytes are requested in advance.
50
-
51
- // Next, a step determines how many random bytes to generate.
52
- // The number of random bytes gets decided upon the ID size, mask,
53
- // alphabet size, and magic number 1.6 (using 1.6 peaks at performance
54
- // according to benchmarks).
55
-
56
- // `-~f => Math.ceil(f)` if f is a float
57
- // `-~i => i + 1` if i is an integer
58
- let step = -~((1.6 * mask * size) / alphabet.length)
59
-
60
- return () => {
61
- let id = ''
62
- while (true) {
63
- let bytes = getRandom(step)
64
- // A compact alternative for `for (var i = 0; i < step; i++)`.
65
- let j = step
66
- while (j--) {
67
- // Adding `|| ''` refuses a random byte that exceeds the alphabet size.
68
- id += alphabet[bytes[j] & mask] || ''
69
- if (id.length === size) return id
70
- }
71
- }
72
- }
73
- }
74
-
75
- let customAlphabet = (alphabet, size) => customRandom(alphabet, size, random)
76
-
77
- let nanoid = (size = 21) => {
78
- let id = ''
79
- let bytes = crypto.getRandomValues(new Uint8Array(size))
80
-
81
- // A compact alternative for `for (var i = 0; i < step; i++)`.
82
- while (size--) {
83
- // It is incorrect to use bytes exceeding the alphabet size.
84
- // The following mask reduces the random byte in the 0-255 value
85
- // range to the 0-63 value range. Therefore, adding hacks, such
86
- // as empty string fallback or magic numbers, is unneccessary because
87
- // the bitmask trims bytes down to the alphabet size.
88
- let byte = bytes[size] & 63
89
- if (byte < 36) {
90
- // `0-9a-z`
91
- id += byte.toString(36)
92
- } else if (byte < 62) {
93
- // `A-Z`
94
- id += (byte - 26).toString(36).toUpperCase()
95
- } else if (byte < 63) {
96
- id += '_'
97
- } else {
98
- id += '-'
99
- }
100
- }
101
- return id
102
- }
103
-
104
- module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random }
package/index.cjs DELETED
@@ -1,81 +0,0 @@
1
- let crypto = require('crypto')
2
-
3
- let { urlAlphabet } = require('./url-alphabet/index.cjs')
4
-
5
- // It is best to make fewer, larger requests to the crypto module to
6
- // avoid system call overhead. So, random numbers are generated in a
7
- // pool. The pool is a Buffer that is larger than the initial random
8
- // request size by this multiplier. The pool is enlarged if subsequent
9
- // requests exceed the maximum buffer size.
10
- const POOL_SIZE_MULTIPLIER = 32
11
- let pool, poolOffset
12
-
13
- let random = bytes => {
14
- fillPool(bytes)
15
- return pool.subarray(poolOffset - bytes, poolOffset)
16
- }
17
-
18
- let fillPool = bytes => {
19
- if (!pool || pool.length < bytes) {
20
- pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER)
21
- crypto.randomFillSync(pool)
22
- poolOffset = 0
23
- } else if (poolOffset + bytes > pool.length) {
24
- crypto.randomFillSync(pool)
25
- poolOffset = 0
26
- }
27
- poolOffset += bytes
28
- }
29
-
30
- let customRandom = (alphabet, size, getRandom) => {
31
- // First, a bitmask is necessary to generate the ID. The bitmask makes bytes
32
- // values closer to the alphabet size. The bitmask calculates the closest
33
- // `2^31 - 1` number, which exceeds the alphabet size.
34
- // For example, the bitmask for the alphabet size 30 is 31 (00011111).
35
- let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
36
- // Though, the bitmask solution is not perfect since the bytes exceeding
37
- // the alphabet size are refused. Therefore, to reliably generate the ID,
38
- // the random bytes redundancy has to be satisfied.
39
-
40
- // Note: every hardware random generator call is performance expensive,
41
- // because the system call for entropy collection takes a lot of time.
42
- // So, to avoid additional system calls, extra bytes are requested in advance.
43
-
44
- // Next, a step determines how many random bytes to generate.
45
- // The number of random bytes gets decided upon the ID size, mask,
46
- // alphabet size, and magic number 1.6 (using 1.6 peaks at performance
47
- // according to benchmarks).
48
- let step = Math.ceil((1.6 * mask * size) / alphabet.length)
49
-
50
- return () => {
51
- let id = ''
52
- while (true) {
53
- let bytes = getRandom(step)
54
- // A compact alternative for `for (let i = 0; i < step; i++)`.
55
- let i = step
56
- while (i--) {
57
- // Adding `|| ''` refuses a random byte that exceeds the alphabet size.
58
- id += alphabet[bytes[i] & mask] || ''
59
- if (id.length === size) return id
60
- }
61
- }
62
- }
63
- }
64
-
65
- let customAlphabet = (alphabet, size) => customRandom(alphabet, size, random)
66
-
67
- let nanoid = (size = 21) => {
68
- fillPool(size)
69
- let id = ''
70
- for (let i = poolOffset - size; i < poolOffset; i++) {
71
- // It is incorrect to use bytes exceeding the alphabet size.
72
- // The following mask reduces the random byte in the 0-255 value
73
- // range to the 0-63 value range. Therefore, adding hacks, such
74
- // as empty string fallback or magic numbers, is unneccessary because
75
- // the bitmask trims bytes down to the alphabet size.
76
- id += urlAlphabet[pool[i] & 63]
77
- }
78
- return id
79
- }
80
-
81
- module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random }
package/index.dev.js DELETED
@@ -1,104 +0,0 @@
1
- // This file replaces `index.js` in bundlers like webpack or Rollup,
2
- // according to `browser` config in `package.json`.
3
-
4
- import { urlAlphabet } from './url-alphabet/index.js'
5
-
6
- if (true) {
7
- // All bundlers will remove this block in the production bundle.
8
- if (
9
- typeof navigator !== 'undefined' &&
10
- navigator.product === 'ReactNative' &&
11
- typeof crypto === 'undefined'
12
- ) {
13
- throw new Error(
14
- 'React Native does not have a built-in secure random generator. ' +
15
- 'If you don’t need unpredictable IDs use `nanoid/non-secure`. ' +
16
- 'For secure IDs, import `react-native-get-random-values` ' +
17
- 'before Nano ID.'
18
- )
19
- }
20
- if (typeof msCrypto !== 'undefined' && typeof crypto === 'undefined') {
21
- throw new Error(
22
- 'Import file with `if (!window.crypto) window.crypto = window.msCrypto`' +
23
- ' before importing Nano ID to fix IE 11 support'
24
- )
25
- }
26
- if (typeof crypto === 'undefined') {
27
- throw new Error(
28
- 'Your browser does not have secure random generator. ' +
29
- 'If you don’t need unpredictable IDs, you can use nanoid/non-secure.'
30
- )
31
- }
32
- }
33
-
34
- let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))
35
-
36
- let customRandom = (alphabet, size, getRandom) => {
37
- // First, a bitmask is necessary to generate the ID. The bitmask makes bytes
38
- // values closer to the alphabet size. The bitmask calculates the closest
39
- // `2^31 - 1` number, which exceeds the alphabet size.
40
- // For example, the bitmask for the alphabet size 30 is 31 (00011111).
41
- // `Math.clz32` is not used, because it is not available in browsers.
42
- let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
43
- // Though, the bitmask solution is not perfect since the bytes exceeding
44
- // the alphabet size are refused. Therefore, to reliably generate the ID,
45
- // the random bytes redundancy has to be satisfied.
46
-
47
- // Note: every hardware random generator call is performance expensive,
48
- // because the system call for entropy collection takes a lot of time.
49
- // So, to avoid additional system calls, extra bytes are requested in advance.
50
-
51
- // Next, a step determines how many random bytes to generate.
52
- // The number of random bytes gets decided upon the ID size, mask,
53
- // alphabet size, and magic number 1.6 (using 1.6 peaks at performance
54
- // according to benchmarks).
55
-
56
- // `-~f => Math.ceil(f)` if f is a float
57
- // `-~i => i + 1` if i is an integer
58
- let step = -~((1.6 * mask * size) / alphabet.length)
59
-
60
- return () => {
61
- let id = ''
62
- while (true) {
63
- let bytes = getRandom(step)
64
- // A compact alternative for `for (var i = 0; i < step; i++)`.
65
- let j = step
66
- while (j--) {
67
- // Adding `|| ''` refuses a random byte that exceeds the alphabet size.
68
- id += alphabet[bytes[j] & mask] || ''
69
- if (id.length === size) return id
70
- }
71
- }
72
- }
73
- }
74
-
75
- let customAlphabet = (alphabet, size) => customRandom(alphabet, size, random)
76
-
77
- let nanoid = (size = 21) => {
78
- let id = ''
79
- let bytes = crypto.getRandomValues(new Uint8Array(size))
80
-
81
- // A compact alternative for `for (var i = 0; i < step; i++)`.
82
- while (size--) {
83
- // It is incorrect to use bytes exceeding the alphabet size.
84
- // The following mask reduces the random byte in the 0-255 value
85
- // range to the 0-63 value range. Therefore, adding hacks, such
86
- // as empty string fallback or magic numbers, is unneccessary because
87
- // the bitmask trims bytes down to the alphabet size.
88
- let byte = bytes[size] & 63
89
- if (byte < 36) {
90
- // `0-9a-z`
91
- id += byte.toString(36)
92
- } else if (byte < 62) {
93
- // `A-Z`
94
- id += (byte - 26).toString(36).toUpperCase()
95
- } else if (byte < 63) {
96
- id += '_'
97
- } else {
98
- id += '-'
99
- }
100
- }
101
- return id
102
- }
103
-
104
- export { nanoid, customAlphabet, customRandom, urlAlphabet, random }
package/index.prod.js DELETED
@@ -1,104 +0,0 @@
1
- // This file replaces `index.js` in bundlers like webpack or Rollup,
2
- // according to `browser` config in `package.json`.
3
-
4
- import { urlAlphabet } from './url-alphabet/index.js'
5
-
6
- if (false) {
7
- // All bundlers will remove this block in the production bundle.
8
- if (
9
- typeof navigator !== 'undefined' &&
10
- navigator.product === 'ReactNative' &&
11
- typeof crypto === 'undefined'
12
- ) {
13
- throw new Error(
14
- 'React Native does not have a built-in secure random generator. ' +
15
- 'If you don’t need unpredictable IDs use `nanoid/non-secure`. ' +
16
- 'For secure IDs, import `react-native-get-random-values` ' +
17
- 'before Nano ID.'
18
- )
19
- }
20
- if (typeof msCrypto !== 'undefined' && typeof crypto === 'undefined') {
21
- throw new Error(
22
- 'Import file with `if (!window.crypto) window.crypto = window.msCrypto`' +
23
- ' before importing Nano ID to fix IE 11 support'
24
- )
25
- }
26
- if (typeof crypto === 'undefined') {
27
- throw new Error(
28
- 'Your browser does not have secure random generator. ' +
29
- 'If you don’t need unpredictable IDs, you can use nanoid/non-secure.'
30
- )
31
- }
32
- }
33
-
34
- let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))
35
-
36
- let customRandom = (alphabet, size, getRandom) => {
37
- // First, a bitmask is necessary to generate the ID. The bitmask makes bytes
38
- // values closer to the alphabet size. The bitmask calculates the closest
39
- // `2^31 - 1` number, which exceeds the alphabet size.
40
- // For example, the bitmask for the alphabet size 30 is 31 (00011111).
41
- // `Math.clz32` is not used, because it is not available in browsers.
42
- let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
43
- // Though, the bitmask solution is not perfect since the bytes exceeding
44
- // the alphabet size are refused. Therefore, to reliably generate the ID,
45
- // the random bytes redundancy has to be satisfied.
46
-
47
- // Note: every hardware random generator call is performance expensive,
48
- // because the system call for entropy collection takes a lot of time.
49
- // So, to avoid additional system calls, extra bytes are requested in advance.
50
-
51
- // Next, a step determines how many random bytes to generate.
52
- // The number of random bytes gets decided upon the ID size, mask,
53
- // alphabet size, and magic number 1.6 (using 1.6 peaks at performance
54
- // according to benchmarks).
55
-
56
- // `-~f => Math.ceil(f)` if f is a float
57
- // `-~i => i + 1` if i is an integer
58
- let step = -~((1.6 * mask * size) / alphabet.length)
59
-
60
- return () => {
61
- let id = ''
62
- while (true) {
63
- let bytes = getRandom(step)
64
- // A compact alternative for `for (var i = 0; i < step; i++)`.
65
- let j = step
66
- while (j--) {
67
- // Adding `|| ''` refuses a random byte that exceeds the alphabet size.
68
- id += alphabet[bytes[j] & mask] || ''
69
- if (id.length === size) return id
70
- }
71
- }
72
- }
73
- }
74
-
75
- let customAlphabet = (alphabet, size) => customRandom(alphabet, size, random)
76
-
77
- let nanoid = (size = 21) => {
78
- let id = ''
79
- let bytes = crypto.getRandomValues(new Uint8Array(size))
80
-
81
- // A compact alternative for `for (var i = 0; i < step; i++)`.
82
- while (size--) {
83
- // It is incorrect to use bytes exceeding the alphabet size.
84
- // The following mask reduces the random byte in the 0-255 value
85
- // range to the 0-63 value range. Therefore, adding hacks, such
86
- // as empty string fallback or magic numbers, is unneccessary because
87
- // the bitmask trims bytes down to the alphabet size.
88
- let byte = bytes[size] & 63
89
- if (byte < 36) {
90
- // `0-9a-z`
91
- id += byte.toString(36)
92
- } else if (byte < 62) {
93
- // `A-Z`
94
- id += (byte - 26).toString(36).toUpperCase()
95
- } else if (byte < 63) {
96
- id += '_'
97
- } else {
98
- id += '-'
99
- }
100
- }
101
- return id
102
- }
103
-
104
- export { nanoid, customAlphabet, customRandom, urlAlphabet, random }
@@ -1,30 +0,0 @@
1
- // This alphabet uses `A-Za-z0-9_-` symbols. The genetic algorithm helped
2
- // optimize the gzip compression for this alphabet.
3
- let urlAlphabet =
4
- 'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW'
5
-
6
- let customAlphabet = (alphabet, size) => {
7
- return () => {
8
- let id = ''
9
- // A compact alternative for `for (var i = 0; i < step; i++)`.
10
- let i = size
11
- while (i--) {
12
- // `| 0` is more compact and faster than `Math.floor()`.
13
- id += alphabet[(Math.random() * alphabet.length) | 0]
14
- }
15
- return id
16
- }
17
- }
18
-
19
- let nanoid = (size = 21) => {
20
- let id = ''
21
- // A compact alternative for `for (var i = 0; i < step; i++)`.
22
- let i = size
23
- while (i--) {
24
- // `| 0` is more compact and faster than `Math.floor()`.
25
- id += urlAlphabet[(Math.random() * 64) | 0]
26
- }
27
- return id
28
- }
29
-
30
- module.exports = { nanoid, customAlphabet }
@@ -1,6 +0,0 @@
1
- {
2
- "type": "module",
3
- "main": "index.cjs",
4
- "module": "index.js",
5
- "react-native": "index.js"
6
- }
@@ -1,6 +0,0 @@
1
- // This alphabet uses `A-Za-z0-9_-` symbols. The genetic algorithm helped
2
- // optimize the gzip compression for this alphabet.
3
- let urlAlphabet =
4
- 'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW'
5
-
6
- module.exports = { urlAlphabet }
@@ -1,6 +0,0 @@
1
- {
2
- "type": "module",
3
- "main": "index.cjs",
4
- "module": "index.js",
5
- "react-native": "index.js"
6
- }