Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigInt support #4

Open
4 tasks
4kimov opened this issue Aug 27, 2023 · 1 comment
Open
4 tasks

BigInt support #4

4kimov opened this issue Aug 27, 2023 · 1 comment

Comments

@4kimov
Copy link
Member

4kimov commented Aug 27, 2023

Right now max value is Number.MAX_SAFE_INTEGER, with no support for bigints. This is an issue for tracking this feature. Hashids has support for it here (for reference): https://github.com/niieani/hashids.js/blob/master/src/hashids.ts

Todos:

  • Support in encode()/decode()
  • Adjust maxValue()
  • Add tests specifically for bigints
  • Add an example of how to use bigints
@phillipb
Copy link

+1 this is useful if you need to do something like convert a uuid to a sqid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants