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

Nullish input of Big constructor results in Error #203

Open
zerosrat opened this issue Jul 20, 2023 · 1 comment
Open

Nullish input of Big constructor results in Error #203

zerosrat opened this issue Jul 20, 2023 · 1 comment

Comments

@zerosrat
Copy link

For example, using Big(null) will cause Error: [big.js] Invalid number while it is common that I can't make sure if the input is not nullish value.

I suggest that Big(null) returns value zero and it logs warning in dev mode.

ref: https://github.com/MikeMcl/big.js/blob/master/big.mjs#L138

@andretf
Copy link

andretf commented Mar 6, 2024

IMO not a good idea. BigInt, which is newer than Number, throws error: tc39/proposal-bigint#15

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