
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
dollar-quotation
Advanced tools
Seja avisado quando a cotação do dólar para sua moeda local estiver abaixo de determinado valor
This is a demo extension to Rung showing how to be alerted when dollar in a specific currency be lower or equal to a specified value.
const { create, run } = require('rung-sdk');
const { OneOf, Money } = require('rung-sdk/dist/types');
const Bluebird = require('bluebird');
const agent = require('superagent');
const promisifyAgent = require('superagent-promise');
const { path } = require('ramda');
const request = promisifyAgent(agent, Bluebird);
function main(context, done) {
const { currency, value } = context.params;
return request.get('http://api.fixer.io/latest?base=USD')
.then(path(['body', 'rates', currency]))
.then(dollar => dollar <= value
? `Dollar is lower or equal to ${value}`
: null)
.then(done)
.catch(() => done());
}
const params = {
currency: {
description: 'Currency to check dollar quotation',
type: OneOf(['BRL', 'EUR']),
default: 'BRL'
},
value: {
description: 'When lower or equal to this, we\'ll tell you',
type: Money,
default: 3.0
}
};
const app = create(main, { params });
app.run();
module.exports = app;
When you clone this repo and install the packages, you can do node index.js
to start the Query Wizard via CLI. We
integrate with a third-party API called fixer.io
.
You'll get this screen and the result:
If you get a valid value as output, an alert would be generated. Otherwise, nothing would happen.
FAQs
Seja avisado quando a cotação do dólar para sua moeda local estiver abaixo de determinado valor
The npm package dollar-quotation receives a total of 0 weekly downloads. As such, dollar-quotation popularity was classified as not popular.
We found that dollar-quotation 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.