javascript-currency-library
Advanced tools
Comparing version 0.1.0 to 0.2.1
@@ -0,1 +1,14 @@ | ||
## [0.2.0](https://github.com/iadvize/javascript-currency-library/tree/0.1.0) (2018-05-07) | ||
**Bug fix:** | ||
- Use 2-letters ISO format for the United States instead of the 3-letters ISO format for better consistency | ||
## [0.2.0](https://github.com/iadvize/javascript-currency-library/tree/0.1.0) (2018-05-07) | ||
**Implemented feature:** | ||
- Add the US dollar in the list of currencies | ||
## [0.1.0](https://github.com/iadvize/javascript-currency-library/tree/0.1.0) (2016-10-07) | ||
@@ -2,0 +15,0 @@ |
@@ -6,3 +6,4 @@ 'use strict'; | ||
EUR: ['ES', 'DE', 'FR', 'IT'], | ||
GBP: ['GB'] | ||
GBP: ['GB'], | ||
USD: ['US'] | ||
}; | ||
@@ -9,0 +10,0 @@ |
{ | ||
"name": "javascript-currency-library", | ||
"version": "0.1.0", | ||
"version": "0.2.1", | ||
"description": "The goal of this javascript library is to provide some services with the currencies", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,3 @@ | ||
# javascript-currency-library | ||
javascript-currency-library [![CircleCI](https://circleci.com/gh/iadvize/javascript-currency-library.svg?style=svg)](https://circleci.com/gh/iadvize/javascript-currency-library) | ||
=========================== | ||
@@ -12,8 +13,4 @@ The goal of this library is to provide some services with the currencies. | ||
### How to install | ||
## Examples | ||
npm install --save javascript-currency-library | ||
### How to use it | ||
```javascript | ||
@@ -38,14 +35,26 @@ const currencyManager = require('javascript-currency-library'); | ||
### Test | ||
## Install | ||
npm test | ||
npm install --save javascript-currency-library | ||
## Documentation | ||
Look at the documentation in the code. | ||
## Contribute | ||
Look at contribution guidelines here : [CONTRIBUTING.md](CONTRIBUTING.md) | ||
### Running tests locally | ||
Simply run : | ||
yarn install && yarn test | ||
To automatically launch the tests when a file is changed : | ||
npm run watch-test | ||
yarn run watch-test | ||
Check the style : | ||
npm run check-build | ||
[![CircleCI](https://circleci.com/gh/iadvize/javascript-currency-library.svg?style=svg)](https://circleci.com/gh/iadvize/javascript-currency-library) | ||
yarn run check-build |
@@ -25,2 +25,3 @@ 'use strict'; | ||
assert.deepEqual(currencyManager.get('GBP').getCountries(), ['GB']); | ||
assert.deepEqual(currencyManager.get('USD').getCountries(), ['US']); | ||
}); | ||
@@ -53,2 +54,3 @@ }); | ||
assert.equal(currencyManager.findByCountry('GB'), 'GBP'); | ||
assert.equal(currencyManager.findByCountry('US'), 'USD'); | ||
}); | ||
@@ -59,4 +61,4 @@ }); | ||
it('should return all the supported currencies', function() { | ||
assert.deepEqual(currencyManager.getSupportedCurrencies(), ['EUR', 'GBP']); | ||
assert.deepEqual(currencyManager.getSupportedCurrencies(), ['EUR', 'GBP', 'USD']); | ||
}); | ||
}); |
149794
22
135
59