4.1.1 • Published 3 years ago

ember-currencies-and-format-money v4.1.1

Weekly downloads
171
License
MIT
Repository
github
Last release
3 years ago

ember-currencies-and-format-money

npm version downloads Build Status Ember Observer Score Dependency Status devDependency Status Code Climate

ember-currencies-and-format-money is an addon that enables you format money amounts in your Ember.js application.

Installation

cd your-project-directory
ember install ember-currencies-and-format-money

Usage

You can use format-money helper in your hbs files by passing a parameter money object with attributes amount and currency. If currency is not set, then TRY is default currency.

{{format-money (hash amount=1000 currency='USD') }}

By default currency is visible. If you want to hide currency, you can set currencyHidden=true parameter.

{{format-money (hash amount=1000 currency='USD') currencyHidden=true }}

You can import formatMoneyAmountByCurrency function and use it by passing amount, currencyValue and currencyHidden parameters.

import { formatMoneyAmountByCurrency } from 'ember-currencies-and-format-money/format-amount';

let amount = 1550;
let currencyValue = 'USD';
let currencyHidden = false;
let result = formatMoneyAmountByCurrency(amount, currencyValue, currencyHidden);
console.log(result); // $15.50

Checkout live examples at ember-currencies-and-format-money demo page

License

This project is licensed under the MIT License.

4.1.1

3 years ago

4.1.0

4 years ago

4.0.0

4 years ago

3.5.1

5 years ago

3.5.0

5 years ago

3.4.1

5 years ago

3.4.0

5 years ago

3.3.2

5 years ago

3.3.1

5 years ago

3.3.0

5 years ago

3.2.0

5 years ago

3.1.2

5 years ago

3.1.1

6 years ago

3.1.0

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.0

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago