npm:ember-dynamic-format-currency | Skypack
You need to enable JavaScript to run this app.
Usage no npm install needed!
<script type="module">
import emberDynamicFormatCurrency from 'https://cdn.skypack.dev/ember-dynamic-format-currency';
</script>
README
ember-dynamic-format-currency
IMPORTANT
This addon has been update to ember 3.0 and ember cli was updated too.
If you are using ember 2.x you should use the version 0.2.0 of this addon
Installation
ember install ember-dynamic-format-currency
Example with arguments
$ 1,000.00
{{format-currency 1000.30}}
$ 1,000.30
{{format-currency 900.30 2}}
$ 900.30
{{format-currency 900.303 3 "€"}}
€ 900.303
{{format-currency 4300.303 3 " quot; " "}}
$ 4 300.303
{{format-currency 4300.30 3 "quot; ","}}
$ 4,300.300
{{format-currency 4300.30 3 "quot; " " ","}}
$ 4 300,300
Example with named arguments
$ 1,000.00
{{format-currency 1000.30}}
$ 1,000.30
{{format-currency 900.30 decimals=2}}
$ 900.30
{{format-currency 900.303 decimals=3 sign="€"}}
€ 900.303
{{format-currency 4300.303 decimals=3 sign="quot; separator=" "}}
$ 4 300.303
{{format-currency 4300.30 decimals=3 sign="quot; separator=","}}
$ 4,300.300
{{format-currency 4300.30 decimals=3 sign="quot; separator=" " decimalSeparator=","}}
$ 4 300,300
Arguments and named arguments
You can mix both, no named arguments and named arguments,
BUT IT IS IMPORTAN THE ORDER WHEN YOU USE NO NAMED ARGUMENTS
the order of the no named arguments
First argument: decimals
Second argument: sign
Third argument: thousands separator
Running
ember server
Visit your app at http://localhost:4200.
Running Tests
npm test (Runs ember try:testall to test your addon against multiple Ember versions)
ember test
ember test --server
Building
For more information on using ember-cli, visit http://www.ember-cli.com/ .
Details
Updated
March 11, 2019
Created
March 11, 2016
Package Security
ES Module Entrypoint
Info
Export Map
Info
added
Keywords
added
License
added
README
added
Repository URL
TypeScript Types
Info
License
MIT
Dependencies
1