This package provides a list of common currencies with their information, including symbol, name, code, decinal digits.
The main currency codes object was taken from a gist from @Fluidbyte:
https://gist.github.com/Fluidbyte/2973986
Using npm:
npm add @moonshot-partners/common-currencies
Using yarn:
yarn add @moonshot-partners/common-currencies
There are to exposed structures, one is object based and the other is as a list.
const { currencyCodes, currencies } = require('common-currencies');
console.log(currencyCodes["GBP"]); // {"symbol": "£", "name": "British Pound Sterling" ...}
console.log(currencies[0]); // {"symbol": "£", "name": "British Pound Sterling" ...}
Download the repo:
git clone https://github.com/moonshot-partners/common-currencies.git
Install dev dependencies:
npm install
Run tests:
jest