1.0.13 • Published 4 years ago

currency-format v1.0.13

Weekly downloads
2,557
License
MIT
Repository
github
Last release
4 years ago

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

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

7 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago