hashids / hashids.github.io

This is the old Hashids website. It is no longer maintained and has migrated over to Sqids.
https://sqids.org
206 stars 34 forks source link

How exact is hashid? #24

Closed smolinari closed 8 years ago

smolinari commented 8 years ago

Playing with the demo, I found this.

image

Is this normal?

Scott

jd327 commented 8 years ago

Hi Scott,

It's just overflowing. For JavaScript libs, I wouldn't go higher than 9007199254740991 (see Number.MAX_SAFE_INTEGER).

smolinari commented 8 years ago

Yeah, sorry. I did some more reading and realized the number was probably too big.

Btw, I love the library. It is a perfect fit to make the RIDs of OrientDB, which are two integers, opaque, for Node Ids in graphQL queries.

Scott

jd327 commented 8 years ago

Cool, glad you find it useful :)