JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 16
  • Score
    100M100P100Q65267F
  • License ISC

Lightweight Node.js arguments parser with 0 Dependencies 🚀. **process-yargs-parser** is an opinionated yargs-parser with many needless yargs-parser configurations disabled by default.

Package Exports

  • process-yargs-parser
  • process-yargs-parser/src/lib

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (process-yargs-parser) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

process-yargs-parser

Lightweight Node.js arguments parser with 0 Dependencies 🚀.

process-yargs-parser is an opinionated yargs-parser with many needless yargs-parser configurations disabled by default.

npm version npm downloads install size jest passed min coverage commit msg linted by git-commit-msg-linter

Example

npm i process-yargs-parser --save
const argv = require('process-yargs-parser')(process.argv.slice(2))

console.log(argv)
node ./example.js --foo=33 --bar hello

{ _: [], foo: 33, bar: 'hello' }

or parse a string!

const argv = require('process-yargs-parser')('--foo=99 --bar=33')

console.log(argv)
{ _: [], foo: 99, bar: 33 }

READ more usages in index.test.js.

Features

  • duplicate-arguments-array: default false
  • short-option-groups: default false
  • boolean-negation: default false
  • no-convert-number-string default false. will convert "1" to 1