node-comline
v0.0.1
Published
Simple command-line parser
Downloads
3
Readme
node-opt
Parse command-line into your NodeJS applications.
node-comline - is a small command-line parser for your NodeJS application.
Installation
npm install node-comline
Bit more detail
Parses your command-line arguments and returns an object with them all in.
Usage
var com = require('node-comline');
// The module provides a single function to interact with, that simply returns
// all arguments parsed when the application was run
// By default, "-" and "--" are removed from the begining of
// the arguements provided; so "--that=argument" will return
// {"that":"argument"}
var config = {"removesingles":false, "removedoubles":false};
// Do this to turn that off
//The core function, set to "com()" in this case...
// Will directly return an object of arugment and value pairs
// So...
console.log(com());
// Will return an [object], without any configuration
// Whereas...
console.log(com(config));
// Will return an [object], and take into account the above created configuration
License
NodeOpt by Darren Looby is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.Based on a work at https://github.com/darrenlooby/node-comline.