Convert numbers to currencies
MIT License
Convert numbers to currencies
$ npm install --save intl-currency
var intlCurrency = require('intl-currency');
intlCurrency(129, {
currency: 'USD',
locales: 'en-US'
});
//=> $129.00
intlCurrency(129, {
currency: 'SEK',
locales: 'sv-SE',
minimumFractionDigits: 0,
maximumFractionDigits: 0
});
//=> 129 kr
Type: number
, string
The value to convert.
See this link for all possible options.
Required
Type: string
The currency to use in formatting. Possible values are the ISO 4217 currency codes, such as USD
for the US dollar or EUR
for the euro. See the currency code list for all possible values.
Required
Type: array
, string
A string with a BCP 47 language tag, or an array of such strings.
MIT © Kevin Mårtensson