# yargs-parser

The mighty option parser used by yargs.

解析命令行参数。(包大小比yargs小,功能也比较少,但够用!) 

# 用法

const argv = require('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('yargs-parser')('--foo=99 --bar=33')
console.log(argv)
{ _: [], foo: 99, bar: 33 }

# 参考

yargs-parse (opens new window)