
Show HN: Js-shortid – Generate short id clearly the simplest - zzzhan
https://github.com/zzzhan/js-shortid
======
sjs382
I usually use hashids for this purpose, which has libraries for a lot of
languages: [http://hashids.org/](http://hashids.org/)

It's quick, easily reversible (so you can translate "XmVgp" to "34" without
consulting the database), and lets you choose the character set and minimum #
of characters.

------
jiyinyiyong
How about this
[https://github.com/dylang/shortid/](https://github.com/dylang/shortid/)

------
tckr
What's wrong with this?

Math.random().toString(36).substr(2, 8)

~~~
subtenante
It's not guaranteed to be unique?

