Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Simple arguments parser in 100 bytes

tree: 5f66404554
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.