diff --git a/index.js b/index.js index 4b73088..2c3675d 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,6 @@ const cheerio = require("cheerio") const got = require("got") -// FIXME: round upto 2 decimal places -// TODO: Add doc for other functions class CurrencyConverter { currencies = { "AFN": "Afghan Afghani", @@ -176,7 +174,6 @@ class CurrencyConverter { if(params["isDecimalComma"] !== undefined) this.setDecimalComma(params["isDecimalComma"]) } - } from (currencyFrom) { if(typeof currencyFrom !== "string") @@ -236,14 +233,7 @@ class CurrencyConverter { else return got(`https://www.google.co.in/search?q=${this.currencyAmount}+${this.currencyFrom}+to+${this.currencyTo}+&hl=en`) .then((html) => { - // const fs = require('fs'); - - // fs.writeFile("a.html", html.body, function(err) { - // if(err) { - // return console.log(err); - // } - // console.log("The file was saved!")}) - return cheerio.load(html.body)}) + return cheerio.load(html.body)}) .then(($) => {return $(".iBp4i").text().split(" ")[0]}) .then((rates) => { if(this.isDecimalComma){ diff --git a/package.json b/package.json index 9c84e91..a6e53ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "currency-converter-lt", - "version": "1.2.4", + "version": "1.3.0", "description": "A nodejs currency converter library that doesn't require subscribing to any API calls.", "main": "index.js", "dependencies": {