cli-args

2.0.0 • Public • Published

cli-args

Build StatusCode Coverage 100%ISC LicenseNodeJS

JavaScript Style Guide

summary

small command line parser

require

var args = require('cli-args')

examples

var args = require('cli-args')(process.argv.slice(2));
console.dir(args);
    
 
 
$ node ex1.js -a hello -b world -2014.5 --hello
{ _: ['hello'], a: 'hello', b: 'world', c: 2014.5 }
 
 
    
$ node ex2.js --date="2014-05-23T12:00:00" --port=80 --clean=false foo --exit
{ 
    _: ['foo', 'exit'],
    date: Thu May 23 2014 12:00:02 GMT+0100 (WEST),
    port: 80,
    clean: false
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    2
  • 1.2.1
    7
  • 1.1.1
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i cli-args

Weekly Downloads

9

Version

2.0.0

License

ISC

Last publish

Collaborators

  • quim