adamhalasz / uniqid

Unique ID Generator
https://adamhalasz.com
617 stars 49 forks source link

Bug - id length varies randomly toggles between 14 and 15. #25

Open Sulaiman90 opened 5 years ago

Sulaiman90 commented 5 years ago

When I tested in nodejs and npm testkit in https://npm.runkit.com/uniqid, id length switches between 14 & 15. Its is not constant.

sam13591980 commented 5 years ago

and for me it is 16 and not 18 based on the document.

elig0n commented 5 years ago

Same I'm getting 14 bytes long instead of 18 as documented. Looks like the documentation is bad because the way it's done in the source mac can have varying number of digits, and pid as well, so one can't infer a constant length for the uniqid.

waleedsamy commented 4 years ago

same, we get 15 char long (expecting 16)

Romstar commented 3 years ago

I've been getting 9 but it's probably because my code is running in a Firebase cloud function.