Update docs
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Andrey Sitnik · committed by Andrey Sitnik · parent 0501d9c · Browse files · 8 files·+25 added−1 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
8 files+25 added−1 removed
- other:+25 added−1 removed
Provenance
- Commit
b5a0590- Tree
7cc82e7- Author
Andrey Sitnik <andrey@sitnik.es>- Committer
Andrey Sitnik <andrey@sitnik.es>- Parent
0501d9c
8 files changed+25 added−1 removed
modified:url-alphabet/index.js+7 added
123456789101112// This alphabet uses `A-Za-z0-9_-` symbols.// The order of characters is optimized for better gzip and brotli compression.// Same as in non-secure/index.js//// This alphabet uses `A-Za-z0-9_-` symbols.// The order of characters is optimized for better gzip and brotli compression.// References to the same file (works both for gzip and brotli):// `'use`, `andom`, and `rict'`// References to the brotli default dictionary:// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`export let urlAlphabet = 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'modified:README.ar.md+3 added
275 unmodified lines276 ```277 278 <div dir="rtl">279 280+لاحظ أن النسخة غير الآمنة _أبطأ_ من النسخة الآمنة.281+استخدمها فقط إذا اضطُررت إلى ذلك.282+283 ### أبجدية أو حجم مخصّص284 285 تُرجع `customAlphabet` دالة تتيح لك إنشاء `nanoid`286 بأبجديتك وحجمك الخاصّين.304 unmodified linesmodified:README.id-ID.md+3 added-1 removed
146 unmodified lines147 Dapat digunakan pula [custom alphabet](#custom-alphabet-or-size) atau [random generator](#custom-random-bytes-generator) yang lain.148 149 ### Non-Secure150 151-Konfigurasi bawaan Nano ID menggunakan random bytes generator yang berasal dari perangkat keras untuk keamanan dan probabilitas collision yang rendah. Apabila tidak terlalu memikirkan soal keamanan, dapat pula menggunakan non-secure generator yang lebih cepat.151+Konfigurasi bawaan Nano ID menggunakan random bytes generator yang berasal dari perangkat keras untuk keamanan dan probabilitas collision yang rendah. Apabila tidak terlalu memikirkan soal keamanan, dapat pula menggunakannya pada lingkungan tanpa hardware random generator.152 153 ```js154 import { nanoid } from 'nanoid/non-secure'155 const id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqLJ"156 ```157 158+Perlu dicatat bahwa versi _non-secure_ _lebih lambat_ daripada versi _secure_. Gunakan hanya jika benar-benar diperlukan.159+160 ### Alfabet dan Ukuran (Custom)161 162 `customAlphabet` digunakan untuk membuat Nano ID dengan alfabet dan ukuran ID yang sesuai dengan kebutuhan (dapat dikustomisasi).163 184 unmodified linesmodified:README.ja.md+2 added
221 unmodified lines222 import { nanoid } from 'nanoid/non-secure'223 const id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqLJ"224 ```225 226+なお、非セキュア版はセキュア版よりも*遅い*ことに注意してください。どうしても必要な場合のみ使用してください。227+228 ### カスタムアルファベットまたはサイズ229 230 customAlphabetは、独自のアルファベットとIDサイズでnanoidを作成できる関数を返します。231 235 unmodified linesmodified:README.ko.md+3 added
222 unmodified lines223 import { nanoid } from 'nanoid/non-secure'224 const id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqLJ"225 ```226 227+단, non-secure 버전은 secure 버전보다 *느리다는* 점에 유의하세요.228+꼭 필요한 경우에만 사용하세요.229+230 ### 사용자 커스텀 문자열231 232 `customAlphabet` 함수를 사용하면 지정된 문자열 내에서 지정된 개수로 이루어진233 랜덤 아이디를 생성할 수 있는 `nanoid` 함수를 만들 수 있습니다238 unmodified linesmodified:README.md+3 added
230 unmodified lines231 import { nanoid } from 'nanoid/non-secure'232 const id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqLJ"233 ```234 235+Note, that non-secure version is _slower_ than secure.236+Use it only if you have to.237+238 ### Custom Alphabet or Size239 240 `customAlphabet` returns a function that allows you to create `nanoid`241 with your own alphabet and ID size.246 unmodified linesmodified:README.ru.md+2 added
236 unmodified lines237 const id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqLJ"238 ```239 240 Но учтите, что предсказуемость ID может быть использована для атаки на систему.241+Кроме того, небезопасная версия работает _медленнее_ безопасной —242+используйте её, только если без неё не обойтись.243 244 ### Смена алфавита или длины245 246 Функция `customAlphabet` позволяет создать свою функцию `nanoid`221 unmodified linesmodified:README.zh-CN.md+2 added
176 unmodified lines177 import { nanoid } from 'nanoid/non-secure'178 const id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqLJ"179 ```180 181+请注意,非安全版本比安全版本*更慢*,请仅在必要时使用。182+183 ### 自定义字母或大小184 185 `customAlphabet` 返回一个函数,允许您使用自定义字母表和ID大小创建 `nanoid`。186 231 unmodified lines