-
Notifications
You must be signed in to change notification settings - Fork 12
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
Multiple doesn't handle floats correctly #46
Comments
Ahhh fun - sorry about that. Is there a validator you added manually as a workaround? Did you come up with a solution? Should we add that back into iz? |
I started exploring this due to mafintosh/is-my-json-valid#172. It seems like the implementation in is-my-json-valid works: |
@LinusU do I have permission to use that code in iz - with some tweaks and tests? Planning on making a new validator for multiples of floats. |
I'm going to assume the answer is yes :). Let me know if the implementation needs to be different. |
Absolutely, the code is MIT licensed! |
e.g.
logs
false
instead oftrue
.This is because
2.3 % 0.01
is0.009999999999999775
in JavaScript 🤦♂️The text was updated successfully, but these errors were encountered: