currency-converter-lt
Advanced tools
Comparing version
@@ -274,3 +274,3 @@ const cheerio = require("cheerio") | ||
return new Promise((resolve, reject) => { | ||
request(`https://www.google.com/search?q=${this.currencyFrom}+to+${this.currencyTo}+&hl=en`, function(error, response, body) { | ||
request(`https://www.google.com/search?q=${this.currencyAmount}+${this.currencyFrom}+to+${this.currencyTo}+&hl=en`, function(error, response, body) { | ||
if (error) { | ||
@@ -298,6 +298,7 @@ return reject(error); | ||
} | ||
rates = parseFloat(rates) / this.currencyAmount | ||
if (this.isRatesCaching) { | ||
this.addRateToRatesCache(currencyPair, parseFloat(rates)); | ||
this.addRateToRatesCache(currencyPair, rates); | ||
} | ||
return parseFloat(rates) | ||
return rates | ||
}) | ||
@@ -304,0 +305,0 @@ } |
{ | ||
"name": "currency-converter-lt", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "A nodejs currency converter library that doesn't require subscribing to any API calls.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
31046
0.19%540
0.19%