Package Exports
- coinify
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (coinify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Install
npm i coinify -sUsage
import coinify from 'coinify'
console.log(coinify.symbol('USD')) // Prints '$'
Functions
coinify.get(code)
Example
coinify.get('USD')returns
{
'symbol': '$',
'name': 'US Dollar',
'symbol_native': '$',
'decimal_digits': 2,
'rounding': 0,
'code': 'USD',
'name_plural': 'US dollars'
}coinify.symbol(code, native = true)
Example
coinify.symbol('NOK')returns
'kr'&
coinify.symbol('NOK', false)returns
'Nkr'coinify.decimals(code)
Example
coinify.decimals('USD')returns
2coinify.rounding(code)
Example
coinify.rounding('USD')returns
0coinify.name(code, plural = false)
Example
coinify.name('USD')returns
'US Dollar'&
coinify.name('USD', true)returns
'US dollars'References:
https://en.wikipedia.org/wiki/ISO_4217 http://www.iotafinance.com/en/ISO-4217-Currency-Codes.html http://www.xe.com/symbols.php https://gist.github.com/Fluidbyte/2973986