1.0.0 • Published 5 years ago

ember-dynamic-format-currency v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

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

  • {{format-currency 1000}}

$ 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 "$" " "}}

$ 4 300.303

  • {{format-currency 4300.30 3 "$" ","}}

$ 4,300.300

  • {{format-currency 4300.30 3 "$" " " ","}}

$ 4 300,300

Example with named arguments

  • {{format-currency 1000}}

$ 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="$" separator=" "}}

$ 4 300.303

  • {{format-currency 4300.30 decimals=3 sign="$" separator=","}}

$ 4,300.300

  • {{format-currency 4300.30 decimals=3 sign="$" 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

Running Tests

  • npm test (Runs ember try:testall to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

1.0.0

5 years ago

0.2.0

7 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago