Skip to content

Commit

Permalink
Fix size limit and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Nov 25, 2024
1 parent 9da8f60 commit eb2db95
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 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 116 bytes (diperkecil dan brotlied). Tidak ada ketergantungan (dependencies) apapun. [Size Limit](https://github.com/ai/size-limit) mengatur ukuran dari generator ini.
- **Ringan.** Hanya 118 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.** 116 bytes (minified and brotlied). No dependencies.
* **Small.** 118 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.
> «Поразительный уровень бессмысленного перфекционизма,
> который просто невозможно не уважать»
- **Лёгкий.** 116 байт (после минификации и Brotli). Без зависимостей.
- **Лёгкий.** 118 байт (после минификации и 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 @@

> “一个惊人的无意义的完美主义水平,这简直让人无法不敬佩。”
* **小巧.** 116字节 (经过压缩和Brotli处理)。没有依赖。[Size Limit] 控制大小。
* **小巧.** 118字节 (经过压缩和Brotli处理)。没有依赖。[Size Limit] 控制大小。
* **安全.** 它使用硬件随机生成器。可在集群中使用。
* **紧凑.** 它使用比 UUID(`A-Za-z0-9_-`)更大的字母表。因此,ID 大小从36个符号减少到21个符号。
* **可移植.** Nano ID 已被移植到 [20种编程语言](#其他编程语言)
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nanoid",
"version": "5.0.8",
"description": "A tiny (116 bytes), secure URL-friendly unique string ID generator",
"description": "A tiny (118 bytes), secure URL-friendly unique string ID generator",
"keywords": [
"uuid",
"random",
Expand Down Expand Up @@ -74,12 +74,12 @@
{
"name": "nanoid",
"import": "{ nanoid }",
"limit": "116 B"
"limit": "118 B"
},
{
"name": "customAlphabet",
"import": "{ customAlphabet }",
"limit": "161 B"
"limit": "164 B"
},
{
"name": "urlAlphabet",
Expand All @@ -90,13 +90,13 @@
"name": "non-secure nanoid",
"import": "{ nanoid }",
"path": "non-secure/index.js",
"limit": "88 B"
"limit": "90 B"
},
{
"name": "non-secure customAlphabet",
"import": "{ customAlphabet }",
"path": "non-secure/index.js",
"limit": "53 B"
"limit": "55 B"
}
],
"prettier": {
Expand Down
4 changes: 2 additions & 2 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ for (let type of ['node', 'browser']) {

test(`avoids pool pollution, infinite loop`, () => {
nanoid(2.1)
const second = nanoid()
const third = nanoid()
let second = nanoid()
let third = nanoid()
notEqual(second, third)
})

Expand Down

0 comments on commit eb2db95

Please sign in to comment.