README.md
This file
The walk stopped after 200 commits: lines older than cdc3edc point at it.
Update size limitAndrey Sitnikbefore adoptioncdc3edc
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)Update size limitAndrey Sitnikbefore adoptioncdc3edc
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.”12Reduce Nano ID size to 117 bytes (#613)Alexander Bayandinbefore adoption05057d8
line 13why, one step back13- **Small.** 117 bytes (minified and brotlied). No dependencies.Update size limitAndrey Sitnikbefore adoptioncdc3edc
line 14why, one step back14 [Size Limit] controls the size.Port amazing nope-id optimizations (#602)Andrey Sitnikbefore adoptionb1bb75f
line 15why, one step back15- **Fast.** 50% faster than native `crypto.randomUUID()`.Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
lines 16–17why, one step back16- **Safe.** It uses hardware random generator. Can be used in clusters.17- **Short IDs.** It uses a larger alphabet than UUID (`A-Za-z0-9_-`).Update size limitAndrey Sitnikbefore adoptioncdc3edc
line 18why, one step back18 So ID size was reduced from 36 to 21 symbols.Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 19why, one step back19- **Portable.** Nano ID was portedUpdate size limitAndrey Sitnikbefore adoptioncdc3edc
lines 20–22why, one step back20 to over [20 programming languages](./README.md#other-programming-languages).2122```jsReduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
lines 23–24why, one step back23import { nanoid } from "nanoid";24model.id = nanoid(); //=> "V1StGXR8_Z5jdHi6B-myT"Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 25–28why, one step back25```2627---28Update EM bannerAndrey Sitnikbefore adoptionb49a237
line 29why, one step back29<img src="https://cdn.evilmartians.com/badges/logo-no-label.svg" alt="" width="22" height="16" /> Nano ID is built by <b><a href="https://evilmartians.com/">Evil Martians</a></b>, an American design and engineering consultancy for <b>developer tools, AI, and cybersecurity startups</b>.Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 30–32why, one step back3031---32Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 33why, one step back33[Size Limit]: https://github.com/ai/size-limitUpdate size limitAndrey Sitnikbefore adoptioncdc3edc
lines 34–41why, one step back3435## Table of Contents3637- [Table of Contents](#table-of-contents)38- [Comparison with UUID](#comparison-with-uuid)39- [Benchmark](#benchmark)40- [Security](#security)41- [Install](#install)Clean up docsAndrey Sitnikbefore adoption90bb934
line 42why, one step back42 - [CDN](#cdn)Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 43–45why, one step back43- [API](#api)44 - [Custom Alphabet or Size](#custom-alphabet-or-size)45 - [Custom Random Bytes Generator](#custom-random-bytes-generator)Update docsAndrey Sitnikbefore adoptionc0779bd
line 46why, one step back46 - [Non-Secure](#non-secure)Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 47–51why, one step back47- [Usage](#usage)48 - [React](#react)49 - [React Native](#react-native)50 - [PouchDB and CouchDB](#pouchdb-and-couchdb)51 - [CLI](#cli)Clean up docsAndrey Sitnikbefore adoptionf7862cb
line 52why, one step back52 - [TypeScript](#typescript)Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 53–68why, one step back53 - [Other Programming Languages](#other-programming-languages)54- [Tools](#tools)5556## Comparison with UUID5758Nano ID is quite comparable to UUID v4 (random-based).59It has a similar number of random bits in the ID60(126 in Nano ID and 122 in UUID), so it has a similar collision probability:6162> For there to be a one in a billion chance of duplication,63> 103 trillion version 4 IDs must be generated.6465There are two main differences between Nano ID and UUID v4:66671. Nano ID uses a bigger alphabet, so a similar number of random bits68 are packed in just 21 symbols instead of 36.Port amazing nope-id optimizations (#602)Andrey Sitnikbefore adoptionb1bb75f
line 69why, one step back692. Nano ID is faster than `crypto.randomUUID` and `uuid/v4`.Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 70–74why, one step back7071## Benchmark7273```rust74$ node ./test/benchmark.jsPort amazing nope-id optimizations (#602)Andrey Sitnikbefore adoptionb1bb75f
lines 75–85why, one step back75nope-id 20,386,830 ops/sec76nanoid 20,434,827 ops/sec77customAlphabet 20,544,476 ops/sec78crypto.randomUUID 12,865,759 ops/sec79uuid v4 7,930,104 ops/sec80@napi-rs/uuid 5,573,171 ops/sec81uid/secure 6,308,267 ops/sec82@lukeed/uuid 5,278,597 ops/sec83nanoid for browser 311,497 ops/sec84secure-random-string 301,667 ops/sec85uid-safe.sync 297,815 ops/secUpdate size limitAndrey Sitnikbefore adoptioncdc3edc
lines 86–87why, one step back8687Non-secure:Port amazing nope-id optimizations (#602)Andrey Sitnikbefore adoptionb1bb75f
lines 88–90why, one step back88uid 20,286,757 ops/sec89nanoid/non-secure 2,397,594 ops/sec90rndm 2,445,462 ops/secUpdate size limitAndrey Sitnikbefore adoptioncdc3edc
lines 91–94why, one step back91```9293## Security94Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
lines 95–96why, one step back95_See a good article about random generators theory:96[Secure random values (in Node.js)]_Update size limitAndrey Sitnikbefore adoptioncdc3edc
line 97why, one step back97Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 98why, one step back98- **Unpredictability.** Instead of using the unsafe `Math.random()`, Nano IDUpdate size limitAndrey Sitnikbefore adoptioncdc3edc
lines 99–100why, one step back99 uses the `crypto` module in Node.js and the Web Crypto API in browsers.100 These modules use unpredictable hardware random generator.Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 101why, one step back101- **Uniformity.** `random % alphabet` is a popular mistake to make when codingUpdate size limitAndrey Sitnikbefore adoptioncdc3edc
lines 102–109why, one step back102 an ID generator. The distribution will not be even; there will be a lower103 chance for some symbols to appear compared to others. So, it will reduce104 the number of tries when brute-forcing. Nano ID uses a [better algorithm]105 and is tested for uniformity.106107 <img src="img/distribution.png" alt="Nano ID uniformity"108 width="340" height="135">109Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 110why, one step back110- **Well-documented:** all Nano ID hacks are documented. See commentsUpdate size limitAndrey Sitnikbefore adoptioncdc3edc
line 111why, one step back111 in [the source].Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 112why, one step back112- **Vulnerabilities:** to report a security vulnerability, please useUpdate size limitAndrey Sitnikbefore adoptioncdc3edc
lines 113–116why, one step back113 the [Tidelift security contact](https://tidelift.com/security).114 Tidelift will coordinate the fix and disclosure.115116[Secure random values (in Node.js)]: https://gist.github.com/joepie91/7105003c3b26e65efcea63f3db82dfbaMove from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
lines 117–118why, one step back117[better algorithm]: https://github.com/ai/nanoid/blob/main/index.js118[the source]: https://github.com/ai/nanoid/blob/main/index.jsUpdate size limitAndrey Sitnikbefore adoptioncdc3edc
lines 119–121why, one step back119120## Install121Clean up docsAndrey Sitnikbefore adoption90bb934
lines 122–123why, one step back122```bash123npm install nanoidUpdate size limitAndrey Sitnikbefore adoptioncdc3edc
line 124why, one step back124```Add JSR docsAndrey Sitnikbefore adoption6ed8f57
line 125why, one step back125Clean up docsAndrey Sitnikbefore adoption90bb934
lines 126–131why, one step back126### CDN127128For quick hacks, you can load Nano ID from CDN. Though, it is not recommended129to be used in production because of the lower loading performance.130131```jsReduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
line 132why, one step back132import { nanoid } from "https://cdn.jsdelivr.net/npm/nanoid/nanoid.js";Clean up docsAndrey Sitnikbefore adoption90bb934
line 133why, one step back133```Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 134–140why, one step back134135## API136137By default, Nano ID uses URL-friendly symbols (`A-Za-z0-9_-`) and returns an ID138with 21 characters (to have a collision probability similar to UUID v4).139140```jsReduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
lines 141–142why, one step back141import { nanoid } from "nanoid";142model.id = nanoid(); //=> "V1StGXR8_Z5jdHi6B-myT"Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 143–148why, one step back143```144145If you want to reduce the ID size (and increase collisions probability),146you can pass the size as an argument.147148```jsReduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
line 149why, one step back149nanoid(10); //=> "IRFa-VaY2b"Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 150–165why, one step back150```151152Don’t forget to check the safety of your ID size153in our [ID collision probability] calculator.154155You can also use a [custom alphabet](#custom-alphabet-or-size)156or a [random generator](#custom-random-bytes-generator).157158[ID collision probability]: https://zelark.github.io/nano-id-cc/159160### Custom Alphabet or Size161162`customAlphabet` returns a function that allows you to create `nanoid`163with your own alphabet and ID size.164165```jsReduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
lines 166–168why, one step back166import { customAlphabet } from "nanoid";167const nanoid = customAlphabet("1234567890abcdef", 10);168model.id = nanoid(); //=> "4f90d13a42"Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 169–171why, one step back169```170171```jsReduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
lines 172–174why, one step back172import { customAlphabet } from "nanoid/non-secure";173const nanoid = customAlphabet("1234567890abcdef", 10);174user.id = nanoid();Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 175–180why, one step back175```176177Check the safety of your custom alphabet and ID size in our178[ID collision probability] calculator. For more alphabets, check out the options179in [`nanoid-dictionary`].180Document the alphabet bounds instead of guarding them at runtime (#609)Jeff Lenamonbefore adoption8588e3a
lines 181–184why, one step back181Alphabet must contain from 1 to 256 symbols.182Otherwise, the security of the internal generator algorithm is not guaranteed,183and a generator built from an empty or over-256-symbol alphabet184can loop forever instead of returning an ID.Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 185–189why, one step back185186In addition to setting a default size, you can change the ID size when calling187the function:188189```jsReduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
lines 190–192why, one step back190import { customAlphabet } from "nanoid";191const nanoid = customAlphabet("1234567890abcdef", 10);192model.id = nanoid(5); //=> "f01a2"Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 193–194why, one step back193```194Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 195why, one step back195[`nanoid-dictionary`]: https://github.com/CyberAP/nanoid-dictionaryUpdate size limitAndrey Sitnikbefore adoptioncdc3edc
lines 196–204why, one step back196197### Custom Random Bytes Generator198199`customRandom` allows you to create a `nanoid` and replace alphabet200and the default random bytes generator.201202In this example, a seed-based generator is used:203204```jsReduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
line 205why, one step back205import { customRandom } from "nanoid";Update size limitAndrey Sitnikbefore adoptioncdc3edc
line 206why, one step back206Reduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
lines 207–210why, one step back207const rng = seedrandom(seed);208const nanoid = customRandom("abcdef", 10, (size) => {209 return new Uint8Array(size).map(() => 256 * rng());210});Update size limitAndrey Sitnikbefore adoptioncdc3edc
line 211why, one step back211Reduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
line 212why, one step back212nanoid(); //=> "fbaefaadeb"Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 213–221why, one step back213```214215`random` callback must accept the array size and return an array216with random numbers.217218If you want to use the same URL-friendly symbols with `customRandom`,219you can get the default alphabet using the `urlAlphabet`.220221```jsReduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
lines 222–223why, one step back222import { customRandom, urlAlphabet } from "nanoid";223const nanoid = customRandom(urlAlphabet, 10, random);Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 224–228why, one step back224```225226Note, that between Nano ID versions we may change random generator227call sequence. If you are using seed-based generators, we do not guarantee228the same result.Update docsAndrey Sitnikbefore adoptionc0779bd
lines 229–236why, one step back229230### Non-Secure231232Nano ID uses hardware random bytes generation for security and low collision233probability. If you are not so concerned with security, you can use it234for environments without hardware random generators.235236```jsReduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
lines 237–238why, one step back237import { nanoid } from "nanoid/non-secure";238const id = nanoid(); //=> "Uakgb_J5m9g-0JDMbcJqLJ"Update docsAndrey Sitnikbefore adoptionc0779bd
lines 239–242why, one step back239```240241Note, that non-secure version is _slower_ than secure.242Use it only if you have to.Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 243–251why, one step back243244## Usage245246### React247248There’s no correct way to use Nano ID for React `key` prop249since it should be consistent among renders.250251```jsxMove from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 252why, one step back252function Todos({ todos }) {Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 253–254why, one step back253 return (254 <ul>Reduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
line 255why, one step back255 {todos.map((todo) => (Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 256why, one step back256 <li key={nanoid()}>Reduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
line 257why, one step back257 {" "}Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 258why, one step back258 /* DON’T DO IT */Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 259–262why, one step back259 {todo.text}260 </li>261 ))}262 </ul>Reduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
line 263why, one step back263 );Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 264–269why, one step back264}265```266267You should rather try to reach for stable ID inside your list item.268269```jsxReduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
line 270why, one step back270const todoItems = todos.map((todo) => <li key={todo.id}>{todo.text}</li>);Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 271–276why, one step back271```272273In case you don’t have stable IDs you'd rather use index as `key`274instead of `nanoid()`:275276```jsxMove from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
lines 277–278why, one step back277const todoItems = todos.map((text, index) => (278 <li key={index}>Reduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
lines 279–281why, one step back279 {" "}280 /* Still not recommended but preferred over nanoid(). Only do this if items have no stable IDs.281 */Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 282–283why, one step back282 {text}283 </li>Reduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
line 284why, one step back284));Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 285–290why, one step back285```286287In case you just need random IDs to link elements like labels288and input fields together, [`useId`] is recommended.289That hook was added in React 18.290Fix outdated info and links in README (#566)Mahmoud Hamdybefore adoptionc7ca9e9
line 291why, one step back291[`useId`]: https://react.dev/reference/react/useIdUpdate size limitAndrey Sitnikbefore adoptioncdc3edc
lines 292–301why, one step back292293### React Native294295React Native does not have built-in random generator. The following polyfill296works for plain React Native and Expo starting with `39.x`.2972981. Check [`react-native-get-random-values`] docs and install it.2992. Import it before Nano ID.300301```jsReduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
lines 302–303why, one step back302import "react-native-get-random-values";303import { nanoid } from "nanoid";Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 304–348why, one step back304```305306[`react-native-get-random-values`]: https://github.com/LinusU/react-native-get-random-values307308### PouchDB and CouchDB309310In PouchDB and CouchDB, IDs can’t start with an underscore `_`.311A prefix is required to prevent this issue, as Nano ID might use a `_`312at the start of the ID by default.313314Override the default ID with the following option:315316```js317db.put({318 _id: 'id' + nanoid(),319 …320})321```322323### CLI324325You can get unique ID in terminal by calling `npx nanoid`. You need only326Node.js in the system. You do not need Nano ID to be installed anywhere.327328```sh329$ npx nanoid330npx: installed 1 in 0.63s331LZfXLFzPPR4NNrgjlWDxn332```333334Size of generated ID can be specified with `--size` (or `-s`) option:335336```sh337$ npx nanoid --size 10338L3til0JS4z339```340341Custom alphabet can be specified with `--alphabet` (or `-a`) option342(note that in this case `--size` is required):343344```sh345$ npx nanoid --alphabet abc --size 15346bccbcabaabaccab347```348Make functions generic so it can cast to opaque (branded) types (#521)Sasha Kossbefore adoptionea64dc7
lines 349–354why, one step back349### TypeScript350351Nano ID allows casting generated strings into opaque strings in TypeScript.352For example:353354```tsReduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
lines 355–356why, one step back355declare const userIdBrand: unique symbol;356type UserId = string & { [userIdBrand]: true };Make functions generic so it can cast to opaque (branded) types (#521)Sasha Kossbefore adoptionea64dc7
line 357why, one step back357Clean up docsAndrey Sitnikbefore adoptionf7862cb
line 358why, one step back358// Use explicit type parameter:Reduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
line 359why, one step back359mockUser(nanoid<UserId>());Clean up docsAndrey Sitnikbefore adoptionf7862cb
line 360why, one step back360Make functions generic so it can cast to opaque (branded) types (#521)Sasha Kossbefore adoptionea64dc7
line 361why, one step back361interface User {Reduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
lines 362–363why, one step back362 id: UserId;363 name: string;Make functions generic so it can cast to opaque (branded) types (#521)Sasha Kossbefore adoptionea64dc7
lines 364–368why, one step back364}365366const user: User = {367 // Automatically casts to UserId:368 id: nanoid(),Reduce dependencies by moving to Rolldown instead of Webpack for Size LimitAndrey Sitnikbefore adoptionb8918c5
lines 369–370why, one step back369 name: "Alice",370};Make functions generic so it can cast to opaque (branded) types (#521)Sasha Kossbefore adoptionea64dc7
line 371why, one step back371```Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 372–377why, one step back372373### Other Programming Languages374375Nano ID was ported to many languages. You can use these ports to have376the same ID generator on the client and server side.377Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
lines 378–398why, one step back378- [C](https://github.com/lukateras/nanoid.h)379- [C#](https://github.com/codeyu/nanoid-net)380- [C++](https://github.com/mcmikecreations/nanoid_cpp)381- [Clojure and ClojureScript](https://github.com/zelark/nano-id)382- [ColdFusion/CFML](https://github.com/JamoCA/cfml-nanoid)383- [Crystal](https://github.com/mamantoha/nanoid.cr)384- [Dart & Flutter](https://github.com/pd4d10/nanoid-dart)385- [Elixir](https://github.com/railsmechanic/nanoid)386- [Gleam](https://github.com/0xca551e/glanoid)387- [Go](https://github.com/matoous/go-nanoid)388- [Haskell](https://github.com/MichelBoucey/NanoID)389- [Haxe](https://github.com/flashultra/uuid)390- [Janet](https://sr.ht/~statianzo/janet-nanoid/)391- [Java](https://github.com/wosherco/jnanoid-enhanced)392- [Kotlin](https://github.com/viascom/nanoid-kotlin)393- [MySQL/MariaDB](https://github.com/viascom/nanoid-mysql-mariadb)394- [Nim](https://github.com/icyphox/nanoid.nim)395- [OCaml](https://github.com/routineco/ocaml-nanoid)396- [Perl](https://github.com/tkzwtks/Nanoid-perl)397- [PHP](https://github.com/hidehalo/nanoid-php)398- Python [native](https://github.com/puyuan/py-nanoid) implementationUpdate size limitAndrey Sitnikbefore adoptioncdc3edc
lines 399–400why, one step back399 with [dictionaries](https://pypi.org/project/nanoid-dictionary)400 and [fast](https://github.com/oliverlambson/fastnanoid) implementation (written in Rust)Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 401why, one step back401- Postgres [Extension](https://github.com/spa5k/uids-postgres)Update size limitAndrey Sitnikbefore adoptioncdc3edc
line 402why, one step back402 and [Native Function](https://github.com/viascom/nanoid-postgres)Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
lines 403–409why, one step back403- [R](https://github.com/hrbrmstr/nanoid) (with dictionaries)404- [Ruby](https://github.com/radeno/nanoid.rb)405- [Rust](https://github.com/nikolay-govorov/nanoid)406- [Swift](https://github.com/ShivaHuang/swift-nanoid)407- [Unison](https://share.unison-lang.org/latest/namespaces/hojberg/nanoid)408- [V](https://github.com/invipal/nanoid)409- [Zig](https://github.com/SasLuca/zig-nanoid)Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 410–416why, one step back410411For other environments, [CLI] is available to generate IDs from a command line.412413[CLI]: #cli414415## Tools416Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
line 417why, one step back417- [ID size calculator] shows collision probability when adjustingUpdate size limitAndrey Sitnikbefore adoptioncdc3edc
line 418why, one step back418 the ID alphabet or size.Move from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
lines 419–420why, one step back419- [`nanoid-dictionary`] with popular alphabets to use with [`customAlphabet`].420- [`nanoid-good`] to be sure that your ID doesn’t contain any obscene words.Update size limitAndrey Sitnikbefore adoptioncdc3edc
lines 421–422why, one step back421422[`nanoid-dictionary`]: https://github.com/CyberAP/nanoid-dictionaryMove from Prettier and ESLint to oxfmt and oxlintAndrey Sitnikbefore adoption4bf7b85
lines 423–425why, one step back423[ID size calculator]: https://zelark.github.io/nano-id-cc/424[`customAlphabet`]: #custom-alphabet-or-size425[`nanoid-good`]: https://github.com/y-gagar1n/nanoid-good