Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
currency-rates-store
Advanced tools
A storage bot to sync exchange rates with any exchange rates api
const CurrStore = require('currency-rates-store');
const pull = require('currency-restapi-openexchangerates').Latest('YOUR_APP_ID');
var store = CurrStore({pull: pull});
// CurrencyRatesStore is an EventEmitter,
// log error, warn, info events
['error', 'warn', 'info'].forEach(lv=> store.on(lv, e=> console.log(e);));
store.on('load', store=>{
// convert €100 EUR to USD
console.log(store.convert(100).from('EUR').to('USD'));
// convert € 1 EUR to USD
console.log(store.from('EUR').to('CAD'));
// simply pass the pair
console.log(store.pair('EURUSD'));
// or pass the symbol one by one
console.log(store.rate('USD', 'EUR'));
// same as above, if the pull restapi request is based on `USD`
console.log(store.rate('EUR'));
});
wait
: milliseconds, default to 3 hours per request. minimum 10 minutes.pull
: restapi wrapper. node.js style callback. it should callback the latest rates in the following structure{
base: 'USD|EUR|GBP' - after `loaded` event, this property is ignored
rates: {
USD: 1,
GBP: ...
EUR: ...
...
}
}
FAQs
A storage bot which sync exchange rates
The npm package currency-rates-store receives a total of 0 weekly downloads. As such, currency-rates-store popularity was classified as not popular.
We found that currency-rates-store demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.