Generate a unique ID based on a custom alphabet. This method uses the non-secure predictable random generator with bigger collision probability.
A random string generator.
import { customAlphabet } from 'nanoid/non-secure'const nanoid = customAlphabet('0123456789абвгдеё', 5)model.id = //=> "8ё56а"
Alphabet used to generate the ID.
Optional
Size of the ID. The default size is 21.
Generated using TypeDoc
Generate a unique ID based on a custom alphabet. This method uses the non-secure predictable random generator with bigger collision probability.
Returns
A random string generator.