emojiid is a really stupid identifier to use instead of some good alternatives such as nanoid or uuid.
Getting started
npm i emoji-identifier
import emojiid from 'emoji-identifier'
emojiid() // returns 'ππ²π§°ππππ«π¦Έ'
Using the API
Request
curl https://www.emojiid.dev/api?length=8&count=3
Response
Loadingβ¦FAQ
Which emojis are used?
It is currently based on Unicode v14.0, but with only emojis that are single character (so for example no skin or hair color modifiers). This results in a character set of 1361 unique emojis.
Note that some emojis from later versions might not be supported on some devices or operating systems. They will still work, but won't have a pictogram representation that works.
All used emojis can be found in the source code.
How does it compare to other id:s?
While nanoid has 126 random bits and UUID v4 has 122, emojiid only has about 83 when using the default length of 8 (8 * log(1361) / log(2)). To get down to about the same collision probability, you would need to use length 12, but I thought that many emojis looked ugly, so I setteled for a default of 8.
It is also not as fast, small or smart as other reasonable identifiers. Please don't use it for anything important :-).
Typescript?
Yes.