Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Simple arguments parser in 100 bytes
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README
arg.js
package.json

README

Simple arguments parser in 100 bytes

By Mikhail Davydov, http://bit.ly/JXLHCO

* Installation
npm install arg

* Use it
var parse = require("arg").parse;

var options = parse("node server.js -h 0.0.0.0 -p 80 -s -a --vvvv --r-x /v 123 /x --debug-enabled=yes");

You got:

{
  "h": "0.0.0.0",
  "p": "80",
  "s": true,
  "a": true,
  "vvvv": true,
  "r-x": true,
  "v": 123,
  "x": true,
  "debug-enabled": "yes"
}

Something went wrong with that request. Please try again.