Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
A simple args parser
$ npm install --save argi
const argi = require('argi');
// Options
argi.option('name', 'description', { default: 'bob', aliases: 'n', boolean: false, hidden: false });
// Commands
argi.command('sayhi', 'description', { hidden: false });
// Parse argv
const parsed = argi.parse(process.argv.slice(2));
if (parsed.sayhi) {
console.log(`Hi ${ parsed.name }!`);
} else {
console.log(args.help());
}
Type: string
The option's name.
Type: string
What the option does. Will be used for help.
Type: object
Type: string
The options default value.
Type: string
, array
Alias names for the option.
Type: boolean
Default: false
Specifies whether the option is a boolean(true
/false
) or a string. If set to true arguments after the option will count as a command or as a separate option.
Example:
...
argi.option('boolean', 'description', { boolean: true });
const parsed = argi.parse(['--boolean', 'value'])
parsed.boolean // => true
parsed._ // => ['value']
...
Type: boolean
Default: false
If option should be displayed in help.
Type: string
The command's name.
Type: string
What the command does. Will be used for help.
Type: object
Type: boolean
Default: false
If command should be displayed in help.
Returns a help string. Will throw an error if it's called before argi.parse()
An array of cli options. You should probably set it to process.argv.slice(2)
Returns an object with the option's values and if commands should be executed.
Example:
...
const parsed = argi.parse(['--test', '--opt', 'yes', 'build']);
// => {
// => test: true,
// => opt: 'yes',
// => build: true
// => }
...
MIT © Tobias Herber
FAQs
A simple args parser
The npm package argi receives a total of 1 weekly downloads. As such, argi popularity was classified as not popular.
We found that argi 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.