Skip to content

jdcrecur/jdc-node-cliarg-reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jdc-node-cliarg-reader

Node command line argument reader into object

A very simple to use cli arg. reader

Example cli call to a file named server.js

node server.js devmode arg2=one|two|potatoes arg3=2742 someOtherArg

In your application file you can now access these arguments very easily using the readAll() function:

var cliarg = require('cliarg').readAll();
/** the variable cliarg will now be a nice object looking like:
 * {
 * 		devmode: true,
 * 		arg2 : ['one', 'two', 'potatoes'],
 * 		arg3 : 2742,
 * 		someOtherArg : false
 * }
 **/

About

Node command line argument reader into object

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published