money-converter
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "money-converter", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A npm module that looks at mutliple exchanges when determining the fx rate", | ||
@@ -5,0 +5,0 @@ "main": "convert.js", |
@@ -16,2 +16,4 @@ # Money Converter | ||
make sure to include the base currency in the list of currencies you pass into the constructor | ||
```javacript | ||
@@ -28,3 +30,3 @@ var MoneyConverter = require('monver-converter'); | ||
function(done) { | ||
money = new MoneyConverter('USD', ['CAD', 'GBP', 'EUR'], done) | ||
money = new MoneyConverter('USD', ['CAD', 'GBP', 'EUR', 'USD'], done) | ||
} | ||
@@ -36,13 +38,12 @@ | ||
money.convert(1000, {from: 'USD', to: 'EUR'}); | ||
// => 913.83 | ||
// => 914 | ||
money.convert(10, {from: 'CAD', to 'EUR'}); | ||
// => 6.65 | ||
} | ||
]) | ||
money.convert(10, {from: 'CAD', to: 'EUR'}); | ||
// => 6.655501347120076 | ||
money.convert(1, {from: 'GBP', to: 'USD'}); | ||
// => 1.50534397109739 | ||
done(); | ||
} | ||
]); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13480
47