Skip to content

Glossary: JavaScript Beyond the Basics

nanoid

Also written: customAlphabet

A popular npm package for generating random, short, hard-to-guess unique IDs. Its `customAlphabet` factory returns a function that makes IDs from your own characters and length, such as Kettle & Crane member IDs.

Where the book teaches it

Related terms

npmFactory function