Skip to content
Myr

Example has 22 not 21 chars (#242)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Seems to be a typo

authored by Shane Rogers · committed by GitHub · parent dc5faec · Browse files · 1 file+1 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

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:README.md+1 added-1 removed
149 unmodified lines
150with 21 characters (to have a collision probability similar to UUID v4).151152```js153import { nanoid } from 'nanoid'154model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqLJ"154model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT"155```156157If you want to reduce the ID size (and increase collisions probability),158you can pass the size as an argument.
345 unmodified lines