emoid
v1.0.1
Published
Create π Emoji IDs instead of uuids because they are more π§π» friendly
Downloads
3
Maintainers
Readme
emoid
Create π Emoji IDs instead of uuids because they are more π§π» friendly
Usage
const id = require('emoid')
// π is a placeholder for one of 1493 emojis
// The default length is 3
id() // -> πππ
id(1) // -> π
id(2) // -> ππ
id(3) // -> πππ
id(5) // -> πππππ
// ...
Probabilities of a non-unique id
For the default length (3), the probability of a non-unique id is 1/3327970157 If you want to calculate it for a custom length, use the following formula:
const id = require('emoid')
id.calculateProbability(length) // -> Output String
id.calculateProbability(3) // -> Every 3327970157th id is non unique when the length is 3 (thats 3.0048346374038715e-8%)