Skip to content

Generate Secure and Clean Unique IDs

View on Twitter

💡 Need to generate unique IDs that will be shown to users? Don't like the awkwardly long MongoDB IDs?

👉🏼 nanoid by @sitnikcode does just that. This super tiny lib (0.008kb!) is secure and has a low collision %.

https://github.com/ai/nanoid

You might also like
Restrict SSH Key to Specific Commands Read tip
Fix R10 Error From Heroku Read tip
Test CSS Selectors With DevTools Read tip