1 min readJul 13, 2018
Very welcome and great question. It’s smarter to include a unique hash as you intend to do. Cuid looks like it would suit well. I personally like shortid (7–14 chars) which I use in place of MongoDB’s native Object ID. By default, the shortid may have a dash which you can exclude with shortid.characters(string)
as described in the docs. Otherwise it will get tough to split hash from the slug. Hope that helps.