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

Option for NaN value for currency filter #88

Closed
cs-jonas opened this issue Aug 17, 2020 · 1 comment
Closed

Option for NaN value for currency filter #88

cs-jonas opened this issue Aug 17, 2020 · 1 comment

Comments

@cs-jonas
Copy link

It would be nice to have an option to set the displayed value for NaN values.
Example:
{{ 1234 | currency('€', {nanValue: '-'}) }} --> '1234.00€'
{{ "NaN" | currency('€', {nanValue: '-'}) }} --> '-'

@freearhey
Copy link
Owner

You can achieve the same result this way:

{{ value | currency('€') || '-' }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants