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
Hi,
Would be great to return a new numeral instance on math operations like this:
var value = numeral(100), discount = numeral(0); return value.subtract(value.multiply(discount).divide(numeral(100)));
It will return 0 instead of 90 since the value.multiply(discount) will change the value instance to 0 instead of returning a new instance with 0.
0
90
value.multiply(discount)
The idea is to mutate the numeral instance only using numeral.fn.set instead of mutating the called instance.
numeral.fn.set
WDYT?
The text was updated successfully, but these errors were encountered:
All other numeral functions manipulate the instance so I don't think these should act differently.
Sorry, something went wrong.
No branches or pull requests
Hi,
Would be great to return a new numeral instance on math operations like this:
It will return
0
instead of90
since thevalue.multiply(discount)
will change the value instance to0
instead of returning a new instance with 0.The idea is to mutate the numeral instance only using
numeral.fn.set
instead of mutating the called instance.WDYT?
The text was updated successfully, but these errors were encountered: