Socket
Socket
Sign inDemoInstall

@oclif/parser

Package Overview
Dependencies
22
Maintainers
7
Versions
44
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @oclif/parser

arg and flag parser for oclif


Version published
Weekly downloads
818K
decreased by-2.83%
Maintainers
7
Install size
526 kB
Created
Weekly downloads
 

Readme

Source

@oclif/parser

This library has been replaced by @oclif/core and is now in maintenance mode. We will only consider PRs that address security concerns.

arg and flag parser for oclif

Version CircleCI Appveyor CI Known Vulnerabilities Downloads/week License

CLI flag parser.

Usage:

const CLI = require('cli-flags')

const {flags, args} = CLI.parse({
  flags: {
    'output-file': CLI.flags.string({char: 'o'}),
    force: CLI.flags.boolean({char: 'f'})
  },
  args: [
    {name: 'input', required: true}
  ]
})

if (flags.force) {
  console.log('--force was set')
}

if (flags['output-file']) {
  console.log(`output file is: ${flags['output-file']}`)
}

console.log(`input arg: ${args.input}`)

// $ node example.js -f myinput --output-file=myexample.txt
// --force was set
// output file is: myexample.txt
// input arg: myinput

Keywords

FAQs

Last updated on 19 Aug 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc