nanoid 5.0.2 → 5.0.4
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.
- package/README.md +1 -1
- package/bin/nanoid.js +11 -12
- package/package.json +2 -2
package/README.md
CHANGED
@@ -10,7 +10,7 @@ A tiny, secure, URL-friendly, unique string ID generator for JavaScript.
|
|
10
10
|
> “An amazing level of senseless perfectionism,
|
11
11
|
> which is simply impossible not to respect.”
|
12
12
|
|
13
|
-
* **Small.**
|
13
|
+
* **Small.** 109 bytes (minified and brotlied). No dependencies.
|
14
14
|
[Size Limit] controls the size.
|
15
15
|
* **Safe.** It uses hardware random generator. Can be used in clusters.
|
16
16
|
* **Short IDs.** It uses a larger alphabet than UUID (`A-Za-z0-9_-`).
|
package/bin/nanoid.js
CHANGED
@@ -8,18 +8,17 @@ function error(msg) {
|
|
8
8
|
process.exit(1)
|
9
9
|
}
|
10
10
|
if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
11
|
-
print(`
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
bcabababca`)
|
11
|
+
print(`Usage
|
12
|
+
$ nanoid [options]
|
13
|
+
Options
|
14
|
+
-s, --size Generated ID size
|
15
|
+
-a, --alphabet Alphabet to use
|
16
|
+
-h, --help Show this help
|
17
|
+
Examples
|
18
|
+
$ nanoid -s 15
|
19
|
+
S9sBF77U6sDB8Yg
|
20
|
+
$ nanoid --size 10 --alphabet abc
|
21
|
+
bcabababca`)
|
23
22
|
process.exit()
|
24
23
|
}
|
25
24
|
let alphabet, size
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "nanoid",
|
3
|
-
"version": "5.0.
|
4
|
-
"description": "A tiny (
|
3
|
+
"version": "5.0.4",
|
4
|
+
"description": "A tiny (109 bytes), secure URL-friendly unique string ID generator",
|
5
5
|
"keywords": [
|
6
6
|
"uuid",
|
7
7
|
"random",
|