Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
args-parser
Advanced tools
Straight-forward node.js arguments parser.
$ node ./script.js careful -dangerous --tomatoes=3 --tonight --key=ek==
{
"careful": true,
"dangerous": true,
"tomatoes": 3,
"tonight": true,
"key": "ek=="
}
$ npm install args-parser
Simply call the module passing it an arguments
array such as process.argv
:
const args = require('args-parser')(process.argv);
console.info(args);
The returned value is an Object
having a key for each given argument and a value if it's found an =
sign (true
otherwise).
Consider this command:
$ node ./script.js careful -dangerous --tomatoes=3 --tonight --key=ek==
Will return:
{
"careful": true,
"dangerous": true,
"tomatoes": 3,
"tonight": true,
"key": "ek=="
}
So then you can easily check what you need:
if (args.careful) {
// Do something
}
FAQs
Straight-forward node.js arguments parser
The npm package args-parser receives a total of 31,958 weekly downloads. As such, args-parser popularity was classified as popular.
We found that args-parser 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.