Alphabet used to generate the ID.
Optional
defaultSize: numberSize of the ID. The default size is 21.
A random string generator.
const { customAlphabet } = require('nanoid')
const nanoid = customAlphabet('0123456789абвгдеё', 5)
nanoid() //=> "8ё56а"
Optional
size: number
Generate secure unique ID with custom alphabet.
Alphabet must contain 256 symbols or less. Otherwise, the generator will not be secure.