Closed NelDav closed 3 years ago
Hey.
The point is that with the alphabet and default length (21 char), it will take ~ 149 billion years to have a 1% probability of at least one collision. This can be considered a unique string.
More about: Birthday problem, Collisions
Thank you very much. I only want to be sure if I missed something in the code. I need to be sure that the strings are unique. Because that I wrapped nanoid to checks if any string already appeared before.
/close
In your description, you talk about a unique string ID. But I cannot find any code which guarantees that the string is unique.
Am I misunderstanding the description or am I missing the relevant code? If there is no guarantee that the string is unique, maybe the word unique in the description should be removed.