Skip to content

giowe/simple-argv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-argv

Dependency Status Gandalf Status

Simple process.argv value parser, if yargs has become an overkill for your needs.

npm i simple-argv

Parsing output example

given this simple program:

const argv = require('simple-argv');
console.log(argv);

executed with this flags:

  node . test1 test2 -a 1 --b 2 -c=testC -d = testD --debug --no-woman --no-cry --happy --key value test3 -xyz

will return this output:

{ "_": [ "test1", "test2", "test3" ],
  "a": 1,
  "b": 2,
  "c": "testC",
  "d": "testD",
  "debug": true,
  "woman": false,
  "cry": false,
  "happy": true,
  "key": "value",
  "x": true,
  "y": true,
  "z": true
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors