
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
yaf-argument-parser
Advanced tools
A simple argument parsing library with nesting actions support. Each having it own set of parameter definitions.
import { ParameterDefinition, ArgumentParser } from "yaf-argument-parser"
const definitions: ParameterDefinition[] = [
{ name: "help", description: "", long: 'help' },
{ name: "testString", description: "", long: 'tstring', type: String },
{ name: "testNumber", description: "", long: 'tnumber', type: Number },
]
const args = process.argv.slice(2)
const argumentParser = new ArgumentParser(definitions)
console.log(argumentParser.parse(args))
node example.js
# --> { arguments: [], matches: {} }
node example.js --help
# --> { arguments: [], matches: { help: true } }
node out/test.js --tstring "bla blu" --tnumber 432
# --> { arguments: [], matches: { testString: 'bla blu', testNumber: 432 } }
import { Action, ParameterDefinition } from "yaf-argument-parser"
const definitionsMain: ParameterDefinition[] = [
{ name: "help", description: "" },
{ name: "verbose", description: "" }
]
const definitionsSearch: ParameterDefinition[] = [
{ name: "help", description: "" },
{ name: "path", description: "", type: String },
]
const args = process.argv.slice(2)
const mainAction = new Action('main', definitionsMain, (matchedArgs, additionalArguments) => {
console.log("main", matchedArgs, additionalArguments)
})
const searchAction = new Action('search', definitionsSearch, (matchedArgs, additionalArguments) => {
console.log("search", matchedArgs, additionalArguments)
})
mainAction.addSubAction(searchAction)
mainAction.run(args)
node example.js --verbose search --path "/home/user/"
# --> main { verbose: true } undefined
# --> search { path: '/home/user/' } []
FAQs
A simple Argument-Parser with Actions
We found that yaf-argument-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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.