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

DEBUG=true flag #246

Open
robertkowalski opened this issue Oct 1, 2019 · 1 comment
Open

DEBUG=true flag #246

robertkowalski opened this issue Oct 1, 2019 · 1 comment

Comments

@robertkowalski
Copy link

robertkowalski commented Oct 1, 2019

Hi Micheal,

thanks for bignumber.js!

.DEBUG=true is quite useful for additional validations before starting to calculate.

Right now its available via debug=true - which sounds more like something that is not supposed to run in prod.

Right now a few validations are run with it (NaN and exponentials afaik). Also, at some point maybe other debug functionalities are added, which makes me worry to use it right away.

Does something speak against a THROW_ON_NAN setting (just an example), maybe additional to the current debug mode?

All the best,
Robert

@MikeMcl
Copy link
Owner

MikeMcl commented May 29, 2022

Apologies for not responding at the time but I left this issue open for consideration.

I don't want to add another setting but perhaps I should have made DEBUG = true throw on NaN, and perhaps Infinity also, in the first place. I also should probably have called it STRICT mode not DEBUG.

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