@candis/currencies

This package includes a list of currencies and their respective formatting, based on existing standards including ISO 4217. The code is taken from CandisIO/candis because we haven't published a shared npm package yet.

Usage no npm install needed!

<script type="module">
  import candisCurrencies from 'https://cdn.skypack.dev/@candis/currencies';
</script>

README

CircleCI Maintainability

Currencies

This package includes a list of currencies and their respective formatting, based on existing standards including ISO 4217. The code is taken from CandisIO/candis because we haven't published a shared npm package yet.

Content

The currency entries in the JSON file include the following field structure (some of the listed fields are optional):

{
  "USD": {
    "symbol": "USquot;,
    "name": "US Dollar",
    "symbol_native": "quot;,
    "decimal_digits": 2,
    "rounding": 0,
    "code": "USD",
    "name_plural": "US dollars",
    "money_format": "${{amount}}",
    "money_with_currency_format": "${{amount}} USD",
    "decimal": ".",
    "thousand": ","
  }
}

How to publish a new version of this package

Please follow the instructions on the wiki