![]() To find out more about the math behind these functions please refer to theĪPI Reference. To 1, higher the uniqueness and thus better the quality). "quality" of the combination of given dictionary and UUID length (the closer Of hitting a duplicate in a given number of rounds (a collision) and theįunction uniqueness() which provides a score (from 0 to 1) to rate the The function collisionProbability() function to calculate the probability If you change the dictionary and/or the UUID length then we have provided So, given the previous values, the probability of generating a duplicate Out of the box this library provides a shuffled dictionary of digits fromĠ to 9, as well as the alphabet from a to z both in UPPER and lower case, This largely depends on the given dictionary and the selected UUID length. What is the probability of generating the same id again? You can find the docs and online generator at: Available forĭocumentation with Online Short UUID Generator The ability to generate UUIDs that contain a timestamp which can be extracted:Ĭonst options = const uid = new ShortUniqueId ( options ) įor more information take a look at the docs. In other words, if you find a bug or want a new feature, please help us by becoming one of theĬontributors ✌️ ! See the contributing section. This project is open to updates by its users, I ensure that PRs are relevant to the community. NOTE: □ On these links you will also find explanations for the math used within the functions. You can calculate duplicate/collision probabilities using the included functions: ![]() 5000 years ago the global population of humans was under 50 million (right now Mexico has a population of 127 million).1000 years ago there was no such thing as government-issued paper money (and wouldn't be for about a century).480 years ago Nicolaus Copernicus was still working on his theory of the Earth revolving around the Sun.120 years ago no human ever had set foot on either of the Earth's poles.73 years is the (global) average life expectancy of a human being.It would take ~10 thousand years to have a 1% probability of at least one collision! if you generate a unique ID of 16 characters (half of the standard UUID of 32 characters).
0 Comments
Leave a Reply. |