Skip to content

Commit 08a1a10

Browse files
paul-shuvopaul-shuvo
authored andcommitted
Fix: fixed the conversion on big amount issue #18
1 parent 33da647 commit 08a1a10

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

index.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,17 +211,16 @@ class CurrencyConverter {
211211
else
212212
return got(`https://www.google.co.in/search?q=${this.currencyAmount}+${this.currencyFrom}+to+${this.currencyTo}`)
213213
.then((html) => {
214-
const fs = require('fs');
214+
// const fs = require('fs');
215215

216-
fs.writeFile("a.html", html.body, function(err) {
217-
if(err) {
218-
return console.log(err);
219-
}
220-
console.log("The file was saved!")})
216+
// fs.writeFile("a.html", html.body, function(err) {
217+
// if(err) {
218+
// return console.log(err);
219+
// }
220+
// console.log("The file was saved!")})
221221
return cheerio.load(html.body)})
222222
.then(($) => {return $(".iBp4i").text().split(" ")[0]})
223223
.then((rates) => {
224-
console.log(rates)
225224
if(rates.includes(","))
226225
rates = rates.replaceAll(",", "")
227226
return parseFloat(rates)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "currency-converter-lt",
3-
"version": "1.2.2",
3+
"version": "1.2.3",
44
"description": "A nodejs currency converter library that doesn't require subscribing to any API calls.",
55
"main": "index.js",
66
"dependencies": {

0 commit comments

Comments
 (0)