Generate secure unique ID with custom alphabet.
Alphabet must contain 256 symbols or less. Otherwise, the generator will not be secure.
Optional
A random string generator.
const { customAlphabet } = require('nanoid')const nanoid = customAlphabet('0123456789абвгдеё', 5)nanoid() //=> "8ё56а" Copy
const { customAlphabet } = require('nanoid')const nanoid = customAlphabet('0123456789абвгдеё', 5)nanoid() //=> "8ё56а"
Generated using TypeDoc
Generate secure unique ID with custom alphabet.
Alphabet must contain 256 symbols or less. Otherwise, the generator will not be secure.