node-argv
Parse argv as a String, then feed minimist and expose the interface:
options: {} commands: through: // only if '--' is given options: {} commands: input: // parsed argv
Parse String
var argv = options = {}; // minimist options ;// return options: hello: true c: 'value' commands: 'first' 'command' through: options: b: true commands: 'second' 'command' input: 'first' 'command' '--hello' 'true' '-c' 'value' '--' 'second' 'command' '-b'
Parse Array
This module also parses an Array directly using minimist
but exposing the above interface
var argv = ; ;
Target
The third parameter is the optional target
, if given it will be used to store the result attributes.
install
With npm do:
npm install node-argv
license
MIT