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

Use of Big Integers limits browser support #62

Open
toBeOfUse opened this issue Jul 9, 2023 · 1 comment
Open

Use of Big Integers limits browser support #62

toBeOfUse opened this issue Jul 9, 2023 · 1 comment

Comments

@toBeOfUse
Copy link

cuid2 recently started using the newer JavaScript BigInt type. BigInts require ES2020 and are supported only by 95% of browsers. Polyfills for BigInts are slow and unpopular; ESBuild won't support one and Babel "doesn't support transforming BigInts.". Is support for the 1 in 20 people who use a non-BigInt-compatible browser on your radar?

@muratgozel
Copy link

yeah, use of bigint prevent us using it in browser environments. specifically this function:

function bufToBigInt(buf) {

and according to the comment in here, its tricky:
evanw/esbuild#732

😞

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