We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Test: currency('1312.444445', {precision: 2}) Expected: 1312.45 Got: 1312.44
currency('1312.444445', {precision: 2})
1312.45
1312.44
Test: currency(1312.45, {precision: 0}) Expected: 1313 Got: 1313
currency(1312.45, {precision: 0})
1313
Test: currency('1312.45', {precision: 0}) Expected: 1313 Got: 1312
currency('1312.45', {precision: 0})
1312
Only the second test yields a correct result! Then if I just pass the value as string instead of a number, the result is wrong!
The text was updated successfully, but these errors were encountered:
Looks like I handled numeric rounding in #102, but completely missed string rounding. Good catch! I'll have a patch release soon.
Sorry, something went wrong.
d1b1033
No branches or pull requests
Test:
currency('1312.444445', {precision: 2})
Expected:
1312.45
Got:
1312.44
Test:
currency(1312.45, {precision: 0})
Expected:
1313
Got:
1313
Test:
currency('1312.45', {precision: 0})
Expected:
1313
Got:
1312
Only the second test yields a correct result! Then if I just pass the value as string instead of a number, the result is wrong!
The text was updated successfully, but these errors were encountered: