Skip to content

JSON with information about currencies: codes (ISO 4217), the names, grapheme (symbols), fraction information and formatting.

License

Notifications You must be signed in to change notification settings

piwel/currency-format

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Currency Format JSON

npm version bower version

JSON with information about currencies: codes (ISO 4217), the names, grapheme (symbols), fraction and formatting.

Installation

Copy the JSON file into your project or use npm/bower package manager:

  • Execute the following command: npm install currency-format or bower install currency-format

Usage

The structure of the JSON file:

{
  'AMD': {                          // ISO 4217 currency code.
     'name': 'Armenian Dram',       // Currency name.
     'fractionSize': 2,             // Fraction size, a number of decimal places.
     'symbol': {                    // Currency symbol information.
         'grapheme': 'դր.',         // Currency symbol.
         'template': '1 $',         // Template showing where the currency symbol should be located
                                    // (before or after amount).
         'rtl': false               // Writing direction.
     },
     'uniqSymbol': {                // Alternative currency symbol. We recommend to use it when you want
                                    // to exclude a repetition of symbols in different currencies.
         'grapheme': 'դր.',         // Alternative currency symbol.
         'template': '1 $',         // Template showing where the alternative currency symbol should be
                                    // located (before or after amount).
         'rtl': false               // Writing direction.
     }
  },
  ...
}

symbol/uniqSymbol field is null, when the currency has no symbol/alternative symbol.

Currency reference

The list of currency codes was taken from https://en.wikipedia.org/wiki/ISO_4217.

License

The MIT License.

See LICENSE

About

JSON with information about currencies: codes (ISO 4217), the names, grapheme (symbols), fraction information and formatting.

Resources

License

Stars

Watchers

Forks

Packages

No packages published