No longer maintained. As the source is not functional.
π°π₯ A simple Node.js module to get the current gold price in rupees.
This module uses the web scraping method to get the latest price of gold from goldratetoday website.
const goldrate = require('indian-gold-price');
goldrate(function(err,rate){
console.log(rate);
});
npm install indian-gold-price
To save as a dependency and use it in your code
npm install indian-gold-price --save
Currently there are no options.
const goldrate = require('indian-gold-price');
goldrate(function(err,rate){
console.log(rate); // => { withsymbol: 'βΉ 31,859', tengram: '31859', onegram: 3185.9 }
console.log(rate.withsymbol); // => βΉ 31,859
console.log(rate.tengram); // => 31859
console.log(rate.onegram); // => 3185.9
});
No tests written so far.
npm install
//npm test