Skip to content

Commit

Permalink
Update Size Limit
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Nov 13, 2023
1 parent 0452313 commit 56e8ef9
Show file tree
Hide file tree
Showing 6 changed files with 201 additions and 186 deletions.
2 changes: 1 addition & 1 deletion README.id-ID.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Sebuah generator ID yang unik dalam bentuk string yang ringan, aman, serta _URL-
> "Sebuah tingkat kesempurnaan yang luar biasa,
> yang mana tidak mungkin untuk tidak dihormati."
- **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.
- **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.
- **Portabel.** Nano ID telah dimigrasi untuk [20 bahasa pemrograman lainnya](#bahasa-pemrograman-lainnya).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A tiny, secure, URL-friendly, unique string ID generator for JavaScript.
> “An amazing level of senseless perfectionism,
> which is simply impossible not to respect.”
* **Small.** 130 bytes (minified and gzipped). No dependencies.
* **Small.** 109 bytes (minified and brotlied). No dependencies.
[Size Limit] controls the size.
* **Safe.** It uses hardware random generator. Can be used in clusters.
* **Short IDs.** It uses a larger alphabet than UUID (`A-Za-z0-9_-`).
Expand Down
2 changes: 1 addition & 1 deletion README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ID можно применять в URL.
> «Поразительный уровень бессмысленного перфекционизма,
> который просто невозможно не уважать»
- **Лёгкий.** 130 байт (после минификации и gzip). Без зависимостей.
- **Лёгкий.** 109 байт (после минификации и Brotli). Без зависимостей.
[Size Limit] следит за размером.
- **Безопасный.** Использует аппаратный генератор случайных чисел.
Можно использовать в кластерах машин.
Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

> “一个惊人的无意义的完美主义水平,这简直让人无法不敬佩。”
* **小巧.** 130字节 (经过压缩和gzip处理)。没有依赖。[Size Limit] 控制大小。
* **小巧.** 109字节 (经过压缩和Brotli处理)。没有依赖。[Size Limit] 控制大小。
* **安全.** 它使用硬件随机生成器。可在集群中使用。
* **紧凑.** 它使用比 UUID(`A-Za-z0-9_-`)更大的字母表。因此,ID 大小从36个符号减少到21个符号。
* **可移植.** Nano ID 已被移植到 [20种编程语言](#其他编程语言)
Expand Down
41 changes: 14 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nanoid",
"version": "5.0.3",
"description": "A tiny (116 bytes), secure URL-friendly unique string ID generator",
"description": "A tiny (109 bytes), secure URL-friendly unique string ID generator",
"keywords": [
"uuid",
"random",
Expand Down Expand Up @@ -44,31 +44,31 @@
"sideEffects": false,
"types": "./index.d.ts",
"devDependencies": {
"@babel/core": "^7.23.2",
"@babel/core": "^7.23.3",
"@logux/eslint-config": "^52.0.1",
"@lukeed/uuid": "^2.0.1",
"@napi-rs/uuid": "^0.2.2",
"@originjs/vite-plugin-commonjs": "^1.0.3",
"@size-limit/file": "^10.0.2",
"@size-limit/webpack": "^10.0.2",
"@types/node": "^20.8.10",
"@size-limit/file": "^11.0.0",
"@size-limit/webpack": "^11.0.0",
"@types/node": "^20.9.0",
"benchmark": "^2.1.4",
"better-node-test": "^0.2.0",
"better-node-test": "^0.3.0",
"c8": "^8.0.1",
"clean-publish": "^4.2.0",
"eslint": "^8.53.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.3.0",
"eslint-plugin-prefer-let": "^3.0.1",
"eslint-plugin-promise": "^6.1.1",
"picocolors": "^1.0.0",
"rndm": "^1.2.0",
"secure-random-string": "^1.1.3",
"shortid": "^2.2.16",
"size-limit": "^10.0.2",
"size-limit": "^11.0.0",
"terser": "^5.24.0",
"uid": "^2.0.2",
"uid-safe": "^2.1.5",
Expand All @@ -79,42 +79,29 @@
{
"name": "nanoid",
"import": "{ nanoid }",
"limit": "116 B"
"limit": "109 B"
},
{
"name": "customAlphabet",
"import": "{ customAlphabet }",
"limit": "174 B"
"limit": "165 B"
},
{
"name": "urlAlphabet",
"import": "{ urlAlphabet }",
"limit": "61 B"
"limit": "47 B"
},
{
"name": "non-secure nanoid",
"import": "{ nanoid }",
"path": "non-secure/index.js",
"limit": "118 B"
"limit": "88 B"
},
{
"name": "non-secure customAlphabet",
"import": "{ customAlphabet }",
"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"
}
],
"eslintConfig": {
Expand Down
Loading

0 comments on commit 56e8ef9

Please sign in to comment.