Package Exports
- mri
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 (mri) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
mri 
Quickly scan for CLI flags and arguments
This is a very basic, fast, and lightweight alternative to minimist
. It only exists because I find that I usually don't need most of what minimist
has to offer.
For now, there's no configuration options. Instead, mri
just parses raw CLI flags (single or group) and assigns a value to those keys.
Note: Defaults, aliases, and type-casting are not supported. However, this may change in the future. 🤔
Install
$ npm install --save mri
Usage
$ demo-cli --foo --bar=baz -mtv -- hello world
const mri = require('mri');
const args = process.argv.slice(2);
mri(args);
//=> { _: ['hello', 'world'], foo:true, bar:'baz', m:true, t:true, v:true }
API
mri(args)
args
Type: array
Default: []
An array of arguments to parse. For CLI usage, send process.argv.slice(2)
. See process.argv
for info.
License
MIT © Luke Edwards