Skip to content

Commit

Permalink
Remove Web Worker note since it is widly avaiable
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Feb 16, 2025
1 parent e0f79c9 commit be66774
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 68 deletions.
15 changes: 0 additions & 15 deletions README.id-ID.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ Mendukung penjelajah (browser) modern, IE [dengan Babel](https://developer.epage
- [React](#react)
- [React Native](#react-native)
- [PouchDB dan CouchDB](#pouchdb-dan-couchdb)
- [Web Workers](#web-workers)
- [CLI](#cli)
- [TypeScript](#typescript)
- [Bahasa Pemrograman Lainnya](#bahasa-pemrograman-lainnya)
Expand Down Expand Up @@ -277,20 +276,6 @@ db.put({
```


### Web Workers

Web Workers tidak memiliki akses untuk secure random generator.

Keamanan sangat penting pada ID yang mana setiap ID harus memiliki sifat tidak bisa diprediksi, seperti pada contoh use-case generasi link pada "access by URL". Apabila tidak memerlukan ID yang tidak bisa diprediksi, tetapi ingin/harus menggunakan Web Workers, dapat digunakan NanoID dengan API non-secure.

```js
import { nanoid } from 'nanoid/non-secure'
nanoid() //=> "Uakgb_J5m9g-0JDMbcJqLJ"
```

Perhatian: ID yang dihasilkan dari non-secure dapat lebih mudah tabrakan / memiliki probabilitas collision yang lebih besar.


### CLI

Nano ID dapat didapatkan dengan cara menggunakan `npx nanoid` pada Terminal. Hanya diperlukan Node.js untuk ini, dan tidak perlu mengunduh dan menginstall Nano ID dalam sistem.
Expand Down
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT"
- [React](#react)
- [React Native](#react-native)
- [PouchDB and CouchDB](#pouchdb-and-couchdb)
- [Web Workers](#web-workers)
- [CLI](#cli)
- [TypeScript](#typescript)
- [Other Programming Languages](#other-programming-languages)
Expand Down Expand Up @@ -374,23 +373,6 @@ db.put({
```


### Web Workers

Web Workers do not have access to a secure random generator.

Security is important in IDs when IDs should be unpredictable.
For instance, in "access by URL" link generation.
If you do not need unpredictable IDs, but you need to use Web Workers,
you can use the non‑secure ID generator.

```js
import { nanoid } from 'nanoid/non-secure'
nanoid() //=> "Uakgb_J5m9g-0JDMbcJqLJ"
```

Note: non-secure IDs are more prone to collision attacks.


### CLI

You can get unique ID in terminal by calling `npx nanoid`. You need only
Expand Down
17 changes: 0 additions & 17 deletions README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT"
- [React](#react)
- [React Native](#react-native)
- [PouchDB и CouchDB](#pouchdb-и-couchdb)
- [Веб-воркеры](#веб-воркеры)
- [Терминал](#терминал)
- [TypeScript](#typescript)
- [Другие языки программирования](#другие-языки-программирования)
Expand Down Expand Up @@ -354,22 +353,6 @@ db.put({
```


### Веб-воркеры

Веб-воркеры не имеют доступа к аппаратному генератору случайных чисел.

Аппаратный генератор нужен, в том числе, для непредсказуемости ID. Например,
когда доступ к секретному документу защищён ссылкой с уникальным ID.

Если вам не нужна непредсказуемость ID, то в Веб-воркере можно использовать
небезопасный генератор ID.

```js
import { nanoid } from 'nanoid/non-secure'
nanoid() //=> "Uakgb_J5m9g-0JDMbcJqLJ"
```


### Терминал

Можно сгенерировать уникальный ID прямо из терминала, вызвав `npx nanoid`.
Expand Down
18 changes: 0 additions & 18 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT"
- [React](#react)
- [React Native](#react-native)
- [PouchDB and CouchDB](#pouchdb-and-couchdb)
- [Web Workers](#web-workers)
- [CLI](#cli)
- [TypeScript](#typescript)
- [其他编程语言](#其他编程语言)
Expand Down Expand Up @@ -329,23 +328,6 @@ db.put({
```


### Web Workers

Web Workers 无法访问安全的随机生成器.

当ID应该是不可预测的时候,安全性对ID很重要。
例如,在 "按 URL 访问"的链接生成中。
如果你不需要不可预测的 ID,但你需要使用 Web Workers。
你可以使用非安全的 ID 生成器。

```js
import { nanoid } from 'nanoid/non-secure'
nanoid() //=> "Uakgb_J5m9g-0JDMbcJqLJ"
```

注意:非安全的ID更容易受到碰撞攻击。


### CLI

你可以通过调用 `npx nanoid` 在终端获得唯一的 ID。你只需要
Expand Down

0 comments on commit be66774

Please sign in to comment.