README.md
This file
Path
README.md
484 lines · 14.2 KiB · Markdown
Last changed by
TypoAndrey Sitnikbefore adoption4eab463
History of this fileTake it
The walk stopped after 200 commits: lines older than cea4beb point at it.
Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 1–5why, one step back1# Nano ID23<img src="https://ai.github.io/nanoid/logo.svg" align="right"4 alt="Nano ID logo by Anton Lovchikov" width="180" height="94">5docs: add Arabic README translation (#556)Mahmoud Hamdybefore adoptiondc629c5
line 6why, one step back6**English** | [日本語](./README.ja.md) | [Русский](./README.ru.md) | [简体中文](./README.zh-CN.md) | [Bahasa Indonesia](./README.id-ID.md) | [한국어](./README.ko.md) | [العربية](./README.ar.md)Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 7–12why, one step back78A tiny, secure, URL-friendly, unique string ID generator for JavaScript.910> “An amazing level of senseless perfectionism,11> which is simply impossible not to respect.”12Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 13why, one step back13- **Small.** 118 bytes (minified and brotlied). No dependencies.Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
line 14why, one step back14 [Size Limit] controls the size.Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
lines 15–16why, one step back15- **Safe.** It uses hardware random generator. Can be used in clusters.16- **Short IDs.** It uses a larger alphabet than UUID (`A-Za-z0-9_-`).Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
line 17why, one step back17 So ID size was reduced from 36 to 21 symbols.Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 18why, one step back18- **Portable.** Nano ID was portedUse Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 19–27why, one step back19 to over [20 programming languages](./README.md#other-programming-languages).2021```js22import { nanoid } from 'nanoid'23model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT"24```2526---27TypoAndrey Sitnikbefore adoption3e281cc
line 28why, one step back28<img src="https://cdn.evilmartians.com/badges/logo-no-label.svg" alt="" width="22" height="16" /> Made at <b><a href="https://evilmartians.com/devtools?utm_source=nanoid&utm_campaign=devtools-button&utm_medium=github">Evil Martians</a></b>, product consulting for <b>developer tools</b>.Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 29–32why, one step back2930---3132[online tool]: https://gitpod.io/#https://github.com/ai/nanoid/Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
lines 33–34why, one step back33[with Babel]: https://developer.epages.com/blog/coding/how-to-transpile-node-modules-with-babel-and-webpack-in-a-monorepo/34[Size Limit]: https://github.com/ai/size-limitUse Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 35–37why, one step back3536## Table of Contents37Add Node.js 22 recommendationAndrey Sitnikbefore adoptiona3d7dc5
lines 38–42why, one step back38- [Table of Contents](#table-of-contents)39- [Comparison with UUID](#comparison-with-uuid)40- [Benchmark](#benchmark)41- [Security](#security)42- [Install](#install)Clean up docsAndrey Sitnikbefore adoption90bb934
lines 43–44why, one step back43 - [ESM](#esm)44 - [CommonJS](#commonjs)Add JSR docsAndrey Sitnikbefore adoption6ed8f57
line 45why, one step back45 - [JSR](#jsr)Clean up docsAndrey Sitnikbefore adoption90bb934
line 46why, one step back46 - [CDN](#cdn)Add Node.js 22 recommendationAndrey Sitnikbefore adoptiona3d7dc5
lines 47–56why, one step back47- [API](#api)48 - [Blocking](#blocking)49 - [Non-Secure](#non-secure)50 - [Custom Alphabet or Size](#custom-alphabet-or-size)51 - [Custom Random Bytes Generator](#custom-random-bytes-generator)52- [Usage](#usage)53 - [React](#react)54 - [React Native](#react-native)55 - [PouchDB and CouchDB](#pouchdb-and-couchdb)56 - [CLI](#cli)Clean up docsAndrey Sitnikbefore adoptionf7862cb
line 57why, one step back57 - [TypeScript](#typescript)Add Node.js 22 recommendationAndrey Sitnikbefore adoptiona3d7dc5
lines 58–59why, one step back58 - [Other Programming Languages](#other-programming-languages)59- [Tools](#tools)Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 60–74why, one step back6061## Comparison with UUID6263Nano ID is quite comparable to UUID v4 (random-based).64It has a similar number of random bits in the ID65(126 in Nano ID and 122 in UUID), so it has a similar collision probability:6667> For there to be a one in a billion chance of duplication,68> 103 trillion version 4 IDs must be generated.6970There are two main differences between Nano ID and UUID v4:71721. Nano ID uses a bigger alphabet, so a similar number of random bits73 are packed in just 21 symbols instead of 36.742. Nano ID code is **4 times smaller** than `uuid/v4` package:Fix outdated info and links in README (#566)Mahmoud Hamdybefore adoptionc7ca9e9
line 75why, one step back75 118 bytes instead of 423.Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 76–80why, one step back7677## Benchmark7879```rust80$ node ./test/benchmark.jsUpdate nope-id for benchmark (#593)Andrey Sitnikbefore adoption78f4a02
lines 81–91why, one step back81nope-id 27,398,074 ops/sec82crypto.randomUUID 14,055,107 ops/sec83uuid v4 9,256,301 ops/sec84@napi-rs/uuid 7,100,180 ops/sec85uid/secure 7,312,765 ops/sec86@lukeed/uuid 5,543,254 ops/sec87nanoid 4,954,561 ops/sec88customAlphabet 6,708,339 ops/sec89nanoid for browser 497,980 ops/sec90secure-random-string 412,049 ops/sec91uid-safe.sync 420,669 ops/secUse Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 92–93why, one step back9293Non-secure:Update nope-id for benchmark (#593)Andrey Sitnikbefore adoption78f4a02
lines 94–96why, one step back94uid 27,106,859 ops/sec95nanoid/non-secure 2,672,540 ops/sec96rndm 2,666,518 ops/secUse Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 97–98why, one step back97```98Update benchmarkAndrey Sitnikbefore adoption25bbffb
line 99why, one step back99Test configuration: Framework 13 7840U, Fedora 39, Node.js 21.6.Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 100–102why, one step back100101## Security102Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
lines 103–104why, one step back103_See a good article about random generators theory:104[Secure random values (in Node.js)]_Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
line 105why, one step back105Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 106why, one step back106- **Unpredictability.** Instead of using the unsafe `Math.random()`, Nano IDUse Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 107–108why, one step back107 uses the `crypto` module in Node.js and the Web Crypto API in browsers.108 These modules use unpredictable hardware random generator.Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 109why, one step back109- **Uniformity.** `random % alphabet` is a popular mistake to make when codingUse Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 110–117why, one step back110 an ID generator. The distribution will not be even; there will be a lower111 chance for some symbols to appear compared to others. So, it will reduce112 the number of tries when brute-forcing. Nano ID uses a [better algorithm]113 and is tested for uniformity.114115 <img src="img/distribution.png" alt="Nano ID uniformity"116 width="340" height="135">117Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 118why, one step back118- **Well-documented:** all Nano ID hacks are documented. See commentsUse Github ReleasesAndrey Sitnikbefore adoptioncea4beb
line 119why, one step back119 in [the source].Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 120why, one step back120- **Vulnerabilities:** to report a security vulnerability, please useUse Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 121–124why, one step back121 the [Tidelift security contact](https://tidelift.com/security).122 Tidelift will coordinate the fix and disclosure.123124[Secure random values (in Node.js)]: https://gist.github.com/joepie91/7105003c3b26e65efcea63f3db82dfbaMove from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
lines 125–126why, one step back125[better algorithm]: https://github.com/ai/nanoid/blob/main/index.js126[the source]: https://github.com/ai/nanoid/blob/main/index.jsUse Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 127–129why, one step back127128## Install129Add instructions for dynamic import in README.md (#516)YitzchakMeltzbefore adoption5681219
line 130why, one step back130### ESMClean up docsAndrey Sitnikbefore adoption90bb934
line 131why, one step back131Fix Install guideAndrey Sitnikbefore adoptiona456c40
line 132why, one step back132Nano ID 5 works with ESM projects (with `import`) in tests or Node.js scripts.Add Node.js 22 recommendationAndrey Sitnikbefore adoptiona3d7dc5
line 133why, one step back133Clean up docsAndrey Sitnikbefore adoption90bb934
lines 134–135why, one step back134```bash135npm install nanoidUse Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 136–137why, one step back136```137Add instructions for dynamic import in README.md (#516)YitzchakMeltzbefore adoption5681219
lines 138–139why, one step back138### CommonJS139Clean up docsAndrey Sitnikbefore adoption90bb934
line 140why, one step back140Nano ID can be used with CommonJS in one of the following ways:Add instructions for dynamic import in README.md (#516)YitzchakMeltzbefore adoption5681219
line 141why, one step back141Clean up docsAndrey Sitnikbefore adoption90bb934
lines 142–147why, one step back142- You can use `require()` to import Nano ID. You need to use latest Node.js143 22.12 (works out-of-the-box) or Node.js 20144 (with `--experimental-require-module`).145146- For Node.js 18 you can dynamically import Nano ID as follows:147Add instructions for dynamic import in README.md (#516)YitzchakMeltzbefore adoption5681219
line 148why, one step back148 ```jsClean up docsAndrey Sitnikbefore adoption90bb934
line 149why, one step back149 let nanoidAdd instructions for dynamic import in README.md (#516)YitzchakMeltzbefore adoption5681219
line 150why, one step back150 module.exports.createID = async () => {Clean up docsAndrey Sitnikbefore adoption90bb934
lines 151–152why, one step back151 if (!nanoid) ({ nanoid } = await import('nanoid'))152 return nanoid() // => "V1StGXR8_Z5jdHi6B-myT"Add instructions for dynamic import in README.md (#516)YitzchakMeltzbefore adoption5681219
lines 153–156why, one step back153 }154 ```155156- You can use Nano ID 3.x (we still support it):Clean up docsAndrey Sitnikbefore adoption90bb934
line 157why, one step back157Add instructions for dynamic import in README.md (#516)YitzchakMeltzbefore adoption5681219
lines 158–160why, one step back158 ```bash159 npm install nanoid@3160 ```Add JSR docsAndrey Sitnikbefore adoption6ed8f57
lines 161–180why, one step back161162### JSR163164[JSR](https://jsr.io) is a replacement for npm with open governance165and active development (in contrast to npm).166167```bash168npx jsr add @sitnik/nanoid169```170171You can use it in Node.js, Deno, Bun, etc.172173```js174// Replace `nanoid` to `@sitnik/nanoid` in all imports175import { nanoid } from '@sitnik/nanoid'176```177178For Deno install it by `deno add jsr:@sitnik/nanoid` or import179from `jsr:@sitnik/nanoid`.180Clean up docsAndrey Sitnikbefore adoption90bb934
lines 181–188why, one step back181### CDN182183For quick hacks, you can load Nano ID from CDN. Though, it is not recommended184to be used in production because of the lower loading performance.185186```js187import { nanoid } from 'https://cdn.jsdelivr.net/npm/nanoid/nanoid.js'188```Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 189–267why, one step back189190## API191192Nano ID has 2 APIs: normal and non-secure.193194By default, Nano ID uses URL-friendly symbols (`A-Za-z0-9_-`) and returns an ID195with 21 characters (to have a collision probability similar to UUID v4).196197### Blocking198199The safe and easiest way to use Nano ID.200201In rare cases could block CPU from other work while noise collection202for hardware random generator.203204```js205import { nanoid } from 'nanoid'206model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT"207```208209If you want to reduce the ID size (and increase collisions probability),210you can pass the size as an argument.211212```js213nanoid(10) //=> "IRFa-VaY2b"214```215216Don’t forget to check the safety of your ID size217in our [ID collision probability] calculator.218219You can also use a [custom alphabet](#custom-alphabet-or-size)220or a [random generator](#custom-random-bytes-generator).221222[ID collision probability]: https://zelark.github.io/nano-id-cc/223224### Non-Secure225226By default, Nano ID uses hardware random bytes generation for security227and low collision probability. If you are not so concerned with security,228you can use it for environments without hardware random generators.229230```js231import { nanoid } from 'nanoid/non-secure'232const id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqLJ"233```234235### Custom Alphabet or Size236237`customAlphabet` returns a function that allows you to create `nanoid`238with your own alphabet and ID size.239240```js241import { customAlphabet } from 'nanoid'242const nanoid = customAlphabet('1234567890abcdef', 10)243model.id = nanoid() //=> "4f90d13a42"244```245246```js247import { customAlphabet } from 'nanoid/non-secure'248const nanoid = customAlphabet('1234567890abcdef', 10)249user.id = nanoid()250```251252Check the safety of your custom alphabet and ID size in our253[ID collision probability] calculator. For more alphabets, check out the options254in [`nanoid-dictionary`].255256Alphabet must contain 256 symbols or less.257Otherwise, the security of the internal generator algorithm is not guaranteed.258259In addition to setting a default size, you can change the ID size when calling260the function:261262```js263import { customAlphabet } from 'nanoid'264const nanoid = customAlphabet('1234567890abcdef', 10)265model.id = nanoid(5) //=> "f01a2"266```267Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 268why, one step back268[`nanoid-dictionary`]: https://github.com/CyberAP/nanoid-dictionaryUse Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 269–281why, one step back269270### Custom Random Bytes Generator271272`customRandom` allows you to create a `nanoid` and replace alphabet273and the default random bytes generator.274275In this example, a seed-based generator is used:276277```js278import { customRandom } from 'nanoid'279280const rng = seedrandom(seed)281const nanoid = customRandom('abcdef', 10, size => {Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 282why, one step back282 return new Uint8Array(size).map(() => 256 * rng())Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 283–294why, one step back283})284285nanoid() //=> "fbaefaadeb"286```287288`random` callback must accept the array size and return an array289with random numbers.290291If you want to use the same URL-friendly symbols with `customRandom`,292you can get the default alphabet using the `urlAlphabet`.293294```jsFix outdated info and links in README (#566)Mahmoud Hamdybefore adoptionc7ca9e9
line 295why, one step back295import { customRandom, urlAlphabet } from 'nanoid'Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 296–310why, one step back296const nanoid = customRandom(urlAlphabet, 10, random)297```298299Note, that between Nano ID versions we may change random generator300call sequence. If you are using seed-based generators, we do not guarantee301the same result.302303## Usage304305### React306307There’s no correct way to use Nano ID for React `key` prop308since it should be consistent among renders.309310```jsxMove from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 311why, one step back311function Todos({ todos }) {Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 312–314why, one step back312 return (313 <ul>314 {todos.map(todo => (Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
lines 315–317why, one step back315 <li key={nanoid()}>316 {' '}317 /* DON’T DO IT */Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 318–328why, one step back318 {todo.text}319 </li>320 ))}321 </ul>322 )323}324```325326You should rather try to reach for stable ID inside your list item.327328```jsxMove from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 329why, one step back329const todoItems = todos.map(todo => <li key={todo.id}>{todo.text}</li>)Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 330–335why, one step back330```331332In case you don’t have stable IDs you'd rather use index as `key`333instead of `nanoid()`:334335```jsxMove from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
lines 336–340why, one step back336const todoItems = todos.map((text, index) => (337 <li key={index}>338 {' '}339 /* Still not recommended but preferred over nanoid(). Only do this if items340 have no stable IDs. */Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 341–342why, one step back341 {text}342 </li>Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 343why, one step back343))Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 344–349why, one step back344```345346In case you just need random IDs to link elements like labels347and input fields together, [`useId`] is recommended.348That hook was added in React 18.349Fix outdated info and links in README (#566)Mahmoud Hamdybefore adoptionc7ca9e9
line 350why, one step back350[`useId`]: https://react.dev/reference/react/useIdUse Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 351–407why, one step back351352### React Native353354React Native does not have built-in random generator. The following polyfill355works for plain React Native and Expo starting with `39.x`.3563571. Check [`react-native-get-random-values`] docs and install it.3582. Import it before Nano ID.359360```js361import 'react-native-get-random-values'362import { nanoid } from 'nanoid'363```364365[`react-native-get-random-values`]: https://github.com/LinusU/react-native-get-random-values366367### PouchDB and CouchDB368369In PouchDB and CouchDB, IDs can’t start with an underscore `_`.370A prefix is required to prevent this issue, as Nano ID might use a `_`371at the start of the ID by default.372373Override the default ID with the following option:374375```js376db.put({377 _id: 'id' + nanoid(),378 …379})380```381382### CLI383384You can get unique ID in terminal by calling `npx nanoid`. You need only385Node.js in the system. You do not need Nano ID to be installed anywhere.386387```sh388$ npx nanoid389npx: installed 1 in 0.63s390LZfXLFzPPR4NNrgjlWDxn391```392393Size of generated ID can be specified with `--size` (or `-s`) option:394395```sh396$ npx nanoid --size 10397L3til0JS4z398```399400Custom alphabet can be specified with `--alphabet` (or `-a`) option401(note that in this case `--size` is required):402403```sh404$ npx nanoid --alphabet abc --size 15405bccbcabaabaccab406```407Make functions generic so it can cast to opaque (branded) types (#521)Sasha Kossbefore adoptionea64dc7
lines 408–414why, one step back408### TypeScript409410Nano ID allows casting generated strings into opaque strings in TypeScript.411For example:412413```ts414declare const userIdBrand: unique symbolClean up docsAndrey Sitnikbefore adoptionf7862cb
line 415why, one step back415type UserId = string & { [userIdBrand]: true }Make functions generic so it can cast to opaque (branded) types (#521)Sasha Kossbefore adoptionea64dc7
line 416why, one step back416Clean up docsAndrey Sitnikbefore adoptionf7862cb
lines 417–419why, one step back417// Use explicit type parameter:418mockUser(nanoid<UserId>())419Make functions generic so it can cast to opaque (branded) types (#521)Sasha Kossbefore adoptionea64dc7
lines 420–430why, one step back420interface User {421 id: UserId422 name: string423}424425const user: User = {426 // Automatically casts to UserId:427 id: nanoid(),428 name: 'Alice'429}430```Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 431–436why, one step back431432### Other Programming Languages433434Nano ID was ported to many languages. You can use these ports to have435the same ID generator on the client and server side.436Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
lines 437–457why, one step back437- [C](https://github.com/lukateras/nanoid.h)438- [C#](https://github.com/codeyu/nanoid-net)439- [C++](https://github.com/mcmikecreations/nanoid_cpp)440- [Clojure and ClojureScript](https://github.com/zelark/nano-id)441- [ColdFusion/CFML](https://github.com/JamoCA/cfml-nanoid)442- [Crystal](https://github.com/mamantoha/nanoid.cr)443- [Dart & Flutter](https://github.com/pd4d10/nanoid-dart)444- [Elixir](https://github.com/railsmechanic/nanoid)445- [Gleam](https://github.com/0xca551e/glanoid)446- [Go](https://github.com/matoous/go-nanoid)447- [Haskell](https://github.com/MichelBoucey/NanoID)448- [Haxe](https://github.com/flashultra/uuid)449- [Janet](https://sr.ht/~statianzo/janet-nanoid/)450- [Java](https://github.com/wosherco/jnanoid-enhanced)451- [Kotlin](https://github.com/viascom/nanoid-kotlin)452- [MySQL/MariaDB](https://github.com/viascom/nanoid-mysql-mariadb)453- [Nim](https://github.com/icyphox/nanoid.nim)454- [OCaml](https://github.com/routineco/ocaml-nanoid)455- [Perl](https://github.com/tkzwtks/Nanoid-perl)456- [PHP](https://github.com/hidehalo/nanoid-php)457- Python [native](https://github.com/puyuan/py-nanoid) implementationUse Github ReleasesAndrey Sitnikbefore adoptioncea4beb
line 458why, one step back458 with [dictionaries](https://pypi.org/project/nanoid-dictionary)Add python fastnanoid (#478)Oliver Lambsonbefore adoption81b5315
line 459why, one step back459 and [fast](https://github.com/oliverlambson/fastnanoid) implementation (written in Rust)Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 460why, one step back460- Postgres [Extension](https://github.com/spa5k/uids-postgres)Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
line 461why, one step back461 and [Native Function](https://github.com/viascom/nanoid-postgres)Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
lines 462–468why, one step back462- [R](https://github.com/hrbrmstr/nanoid) (with dictionaries)463- [Ruby](https://github.com/radeno/nanoid.rb)464- [Rust](https://github.com/nikolay-govorov/nanoid)465- [Swift](https://github.com/ShivaHuang/swift-nanoid)466- [Unison](https://share.unison-lang.org/latest/namespaces/hojberg/nanoid)467- [V](https://github.com/invipal/nanoid)468- [Zig](https://github.com/SasLuca/zig-nanoid)Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 469–475why, one step back469470For other environments, [CLI] is available to generate IDs from a command line.471472[CLI]: #cli473474## Tools475Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 476why, one step back476- [ID size calculator] shows collision probability when adjustingUse Github ReleasesAndrey Sitnikbefore adoptioncea4beb
line 477why, one step back477 the ID alphabet or size.Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
lines 478–479why, one step back478- [`nanoid-dictionary`] with popular alphabets to use with [`customAlphabet`].479- [`nanoid-good`] to be sure that your ID doesn’t contain any obscene words.Use Github ReleasesAndrey Sitnikbefore adoptioncea4beb
lines 480–481why, one step back480481[`nanoid-dictionary`]: https://github.com/CyberAP/nanoid-dictionaryMove from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
lines 482–484why, one step back482[ID size calculator]: https://zelark.github.io/nano-id-cc/483[`customAlphabet`]: #custom-alphabet-or-size484[`nanoid-good`]: https://github.com/y-gagar1n/nanoid-good