@nichoth/nanoid
Advanced tools
Comparing version 5.0.4 to 5.0.5
@@ -15,17 +15,16 @@ #!/usr/bin/env node | ||
if (process.argv.includes('--help') || process.argv.includes('-h')) { | ||
print(` | ||
Usage | ||
$ nanoid [options] | ||
print(`Usage | ||
$ nanoid [options] | ||
Options | ||
-s, --size Generated ID size | ||
-a, --alphabet Alphabet to use | ||
-h, --help Show this help | ||
Options | ||
-s, --size Generated ID size | ||
-a, --alphabet Alphabet to use | ||
-h, --help Show this help | ||
Examples | ||
$ nanoid --s 15 | ||
S9sBF77U6sDB8Yg | ||
Examples | ||
$ nanoid -s 15 | ||
S9sBF77U6sDB8Yg | ||
$ nanoid --size 10 --alphabet abc | ||
bcabababca`) | ||
$ nanoid --size 10 --alphabet abc | ||
bcabababca`) | ||
process.exit() | ||
@@ -32,0 +31,0 @@ } |
# Change Log | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
## 5.0.4 | ||
* Fixed CLI docs (by @ilyaboka). | ||
## 5.0.3 | ||
* Fixed CLI docs (by Chris Schmich). | ||
## 5.0.2 | ||
@@ -27,2 +33,5 @@ * Fixed `webcrypto` import (by Divyansh Singh). | ||
## 3.3.7 | ||
* Fixed `node16` TypeScript support (by Saadi Myftija). | ||
## 3.3.6 | ||
@@ -29,0 +38,0 @@ * Fixed package. |
{ | ||
"name": "@nichoth/nanoid", | ||
"version": "5.0.4", | ||
"description": "A tiny (116 bytes), secure URL-friendly unique string ID generator", | ||
"version": "5.0.5", | ||
"description": "A tiny (109 bytes), secure URL-friendly unique string ID generator", | ||
"keywords": [ | ||
@@ -48,20 +48,20 @@ "uuid", | ||
"devDependencies": { | ||
"@babel/core": "^7.23.2", | ||
"@logux/eslint-config": "^52.0.1", | ||
"@babel/core": "^7.23.5", | ||
"@logux/eslint-config": "^52.0.2", | ||
"@lukeed/uuid": "^2.0.1", | ||
"@napi-rs/uuid": "^0.2.2", | ||
"@originjs/vite-plugin-commonjs": "^1.0.3", | ||
"@size-limit/file": "^10.0.1", | ||
"@size-limit/webpack": "^10.0.1", | ||
"@types/node": "^20.8.7", | ||
"@size-limit/file": "^11.0.0", | ||
"@size-limit/webpack": "^11.0.0", | ||
"@types/node": "^20.10.2", | ||
"benchmark": "^2.1.4", | ||
"better-node-test": "^0.2.0", | ||
"better-node-test": "^0.4.1", | ||
"c8": "^8.0.1", | ||
"clean-publish": "^4.2.0", | ||
"eslint": "^8.52.0", | ||
"eslint": "^8.55.0", | ||
"eslint-config-standard": "^17.1.0", | ||
"eslint-plugin-import": "^2.29.0", | ||
"eslint-plugin-n": "^16.2.0", | ||
"eslint-plugin-n": "^16.3.1", | ||
"eslint-plugin-node-import": "^1.0.4", | ||
"eslint-plugin-perfectionist": "^2.2.0", | ||
"eslint-plugin-perfectionist": "^2.5.0", | ||
"eslint-plugin-prefer-let": "^3.0.1", | ||
@@ -73,8 +73,8 @@ "eslint-plugin-promise": "^6.1.1", | ||
"shortid": "^2.2.16", | ||
"size-limit": "^10.0.1", | ||
"terser": "^5.22.0", | ||
"size-limit": "^11.0.0", | ||
"terser": "^5.24.0", | ||
"uid": "^2.0.2", | ||
"uid-safe": "^2.1.5", | ||
"uuid": "^9.0.1", | ||
"vite": "^4.5.0" | ||
"vite": "^5.0.4" | ||
}, | ||
@@ -85,3 +85,3 @@ "size-limit": [ | ||
"import": "{ nanoid }", | ||
"limit": "116 B" | ||
"limit": "109 B" | ||
}, | ||
@@ -91,3 +91,3 @@ { | ||
"import": "{ customAlphabet }", | ||
"limit": "174 B" | ||
"limit": "165 B" | ||
}, | ||
@@ -97,3 +97,3 @@ { | ||
"import": "{ urlAlphabet }", | ||
"limit": "61 B" | ||
"limit": "47 B" | ||
}, | ||
@@ -104,3 +104,3 @@ { | ||
"path": "non-secure/index.js", | ||
"limit": "118 B" | ||
"limit": "88 B" | ||
}, | ||
@@ -111,16 +111,3 @@ { | ||
"path": "non-secure/index.js", | ||
"limit": "69 B" | ||
}, | ||
{ | ||
"name": "Brotli all", | ||
"brotli": true, | ||
"import": "{ nanoid, customAlphabet, urlAlphabet }", | ||
"limit": "260 B" | ||
}, | ||
{ | ||
"name": "Brotli non-secure", | ||
"brotli": true, | ||
"import": "{ nanoid, customAlphabet }", | ||
"path": "non-secure/index.js", | ||
"limit": "116 B" | ||
"limit": "53 B" | ||
} | ||
@@ -127,0 +114,0 @@ ], |
@@ -13,3 +13,3 @@ # Nano ID | ||
- **Ringan.** Hanya 130 bytes (diperkecil dan gzipped). Tidak ada ketergantungan (dependencies) apapun. [Size Limit](https://github.com/ai/size-limit) mengatur ukuran dari generator ini. | ||
- **Ringan.** Hanya 109 bytes (diperkecil dan brotlied). Tidak ada ketergantungan (dependencies) apapun. [Size Limit](https://github.com/ai/size-limit) mengatur ukuran dari generator ini. | ||
- **Aman.** Nano ID menggunakan RNG yang terdapat pada perangkat keras. Dapat digunakan dalam lingkungan seperti klaster. | ||
@@ -322,2 +322,3 @@ - **ID yang pendek.** Nano ID menggunakan alfabet yang lebih banyak ketimbang UUID (`A-Za-z0-9_-`), karenanya ukuran ID menjadi berkurang dari 36 menjadi 21 simbol. | ||
- [Java](https://github.com/aventrix/jnanoid) | ||
- [Kotlin](https://github.com/viascom/nanoid-kotlin) | ||
- [MySQL/MariaDB](https://github.com/viascom/nanoid-mysql-mariadb) | ||
@@ -324,0 +325,0 @@ - [Nim](https://github.com/icyphox/nanoid.nim) |
@@ -13,3 +13,3 @@ # Nano ID | ||
* **Small.** 130 bytes (minified and gzipped). No dependencies. | ||
* **Small.** 109 bytes (minified and brotlied). No dependencies. | ||
[Size Limit] controls the size. | ||
@@ -37,2 +37,4 @@ * **Safe.** It uses hardware random generator. Can be used in clusters. | ||
## fork | ||
This is a fork of [ai/nanoid](https://github.com/ai/nanoid); it is functionally equivalent. | ||
@@ -394,2 +396,3 @@ ## Table of Contents | ||
### Other Programming Languages | ||
@@ -413,2 +416,3 @@ | ||
* [Java](https://github.com/aventrix/jnanoid) | ||
* [Kotlin](https://github.com/viascom/nanoid-kotlin) | ||
* [MySQL/MariaDB](https://github.com/viascom/nanoid-mysql-mariadb) | ||
@@ -415,0 +419,0 @@ * [Nim](https://github.com/icyphox/nanoid.nim) |
@@ -14,3 +14,3 @@ # Nano ID | ||
- **Лёгкий.** 130 байт (после минификации и gzip). Без зависимостей. | ||
- **Лёгкий.** 109 байт (после минификации и Brotli). Без зависимостей. | ||
[Size Limit] следит за размером. | ||
@@ -391,2 +391,3 @@ - **Безопасный.** Использует аппаратный генератор случайных чисел. | ||
- [Java](https://github.com/aventrix/jnanoid) | ||
- [Kotlin](https://github.com/viascom/nanoid-kotlin) | ||
- [MySQL/MariaDB](https://github.com/viascom/nanoid-mysql-mariadb) | ||
@@ -393,0 +394,0 @@ - [Nim](https://github.com/icyphox/nanoid.nim) |
@@ -12,3 +12,3 @@ # Nano ID | ||
* **小巧.** 130字节 (经过压缩和gzip处理)。没有依赖。[Size Limit] 控制大小。 | ||
* **小巧.** 109字节 (经过压缩和Brotli处理)。没有依赖。[Size Limit] 控制大小。 | ||
* **安全.** 它使用硬件随机生成器。可在集群中使用。 | ||
@@ -390,2 +390,3 @@ * **紧凑.** 它使用比 UUID(`A-Za-z0-9_-`)更大的字母表。因此,ID 大小从36个符号减少到21个符号。 | ||
* [Java](https://github.com/aventrix/jnanoid) | ||
* [Kotlin](https://github.com/viascom/nanoid-kotlin) | ||
* [MySQL/MariaDB](https://github.com/viascom/nanoid-mysql-mariadb) | ||
@@ -392,0 +393,0 @@ * [Nim](https://github.com/icyphox/nanoid.nim) |
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
85548
447
335