summaryrefslogtreecommitdiff
path: root/deps/npm/test/npm_cache/_cacache/content-v2/sha512/ed/fc/2d79d0d55bf4ea02b74ecc3657ea833bc6d0578adb2e1f5ae0d733b09a484f8e7287901578c7bdaa5d6fd30ac4dea48773a610ca6ee1e09e31f6147e921d
blob: 34df07b38c356e4079408c5ab9524a0c9fd27a1d (plain)
1
{"_id":"optimist","_rev":"147-993915d1034a2506e97797cd2d1bd171","name":"optimist","dist-tags":{"latest":"0.6.0"},"versions":{"0.0.1":{"name":"optimist","version":"0.0.1","descrption":"Light-weight option parsing","modules":{"index":"./optimist.js"},"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"engine":["node >=0.1.100"],"_id":"optimist@0.0.1","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://localhost:1337/optimist/-/optimist-0.0.1.tgz","shasum":"be66175d8781290f1672ae96858814c88274c41c"},"directories":{}},"0.0.2":{"name":"optimist","version":"0.0.2","description":"Light-weight option parsing","modules":{"index":"./optimist.js"},"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"engine":["node >=0.1.100"],"_id":"optimist@0.0.2","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://localhost:1337/optimist/-/optimist-0.0.2.tgz","shasum":"594ac6711315fa0d06887e3833567ff3fc7de4e1"},"directories":{}},"0.0.4":{"name":"optimist","version":"0.0.4","description":"Light-weight option parsing with an argv hash. No optstrings attached.","modules":{"index":"./lib/optimist.js"},"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"license":"MIT/X11","engine":["node >=0.1.100"],"_id":"optimist@0.0.4","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://localhost:1337/optimist/-/optimist-0.0.4.tgz","shasum":"6d5a2516e5b9a4808a8477cd62086ef829f07f4e"},"directories":{}},"0.0.5":{"name":"optimist","version":"0.0.5","description":"Light-weight option parsing with an argv hash. No optstrings attached.","modules":{"index":"./lib/optimist.js"},"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"license":"MIT/X11","engine":["node >=0.1.100"],"_id":"optimist@0.0.5","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://localhost:1337/optimist/-/optimist-0.0.5.tgz","shasum":"79f3bd7caf7c9002ace2a0600df80761fa459ea7"},"directories":{}},"0.0.6":{"name":"optimist","version":"0.0.6","description":"Light-weight option parsing with an argv hash. No optstrings attached.","modules":{"index":"./lib/optimist.js"},"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"license":"MIT/X11","engine":["node >=0.1.100"],"_id":"optimist@0.0.6","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://localhost:1337/optimist/-/optimist-0.0.6.tgz","shasum":"1e00197a8f5c010ed02c9bed629af28422c51bdf"},"directories":{}},"0.0.7":{"name":"optimist","version":"0.0.7","description":"Light-weight option parsing with an argv hash. No optstrings attached.","modules":{"index":"./lib/optimist.js"},"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"license":"MIT/X11","engine":["node >=0.1.100"],"_id":"optimist@0.0.7","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.10","_nodeVersion":"v0.2.5","dist":{"shasum":"5ffc1dce7ddfdfe57a61fabb2644d7bda57722b2","tarball":"http://localhost:1337/optimist/-/optimist-0.0.7.tgz"},"directories":{}},"0.1.0":{"name":"optimist","version":"0.1.0","description":"Light-weight option parsing with an argv hash. No optstrings attached.","modules":{"index":"./lib/optimist.js"},"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"license":"MIT/X11","engine":["node >=0.1.100"],"_id":"optimist@0.1.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.10","_nodeVersion":"v0.2.5","dist":{"shasum":"b523820a36a51c35bf6098d2dc4b5aa001e0f541","tarball":"http://localhost:1337/optimist/-/optimist-0.1.0.tgz"},"directories":{}},"0.1.1":{"name":"optimist","version":"0.1.1","description":"Light-weight option parsing with an argv hash. No optstrings attached.","modules":{"index":"./lib/optimist.js"},"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"license":"MIT/X11","engine":["node >=0.1.100"],"_id":"optimist@0.1.1","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.10","_nodeVersion":"v0.2.5","dist":{"shasum":"ed43041fe2196e9f36b9c0f75e301526ab751baa","tarball":"http://localhost:1337/optimist/-/optimist-0.1.1.tgz"},"directories":{}},"0.1.2":{"name":"optimist","version":"0.1.2","description":"Light-weight option parsing with an argv hash. No optstrings attached.","modules":{"index":"./lib/optimist.js"},"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"keywords":["argument","option","parser","parsing"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":["node >=0.1.100"],"_id":"optimist@0.1.2","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.12-1","_nodeVersion":"v0.2.5","dist":{"shasum":"489780fb5350e8429e99a9e6e1305124eb3bbc8e","tarball":"http://localhost:1337/optimist/-/optimist-0.1.2.tgz"},"directories":{}},"0.1.3":{"name":"optimist","version":"0.1.3","description":"Light-weight option parsing with an argv hash. No optstrings attached.","modules":{"index":"./lib/optimist.js"},"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"keywords":["argument","option","parser","parsing"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":["node >=0.1.100"],"_id":"optimist@0.1.3","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.12-1","_nodeVersion":"v0.2.5","dist":{"shasum":"90389a7e6807b5798b41c4b4112403a9691b98ff","tarball":"http://localhost:1337/optimist/-/optimist-0.1.3.tgz"},"directories":{}},"0.1.4":{"name":"optimist","version":"0.1.4","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index","repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"keywords":["argument","option","parser","parsing"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":["node >=0.1.100"],"_id":"optimist@0.1.4","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.2.16","_nodeVersion":"v0.3.8-pre","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"92496e1e378b46a24b6c027a612637cfc5fb543e","tarball":"http://localhost:1337/optimist/-/optimist-0.1.4.tgz"}},"0.1.5":{"name":"optimist","version":"0.1.5","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index","repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"keywords":["argument","option","parser","parsing"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":["node >=0.1.100"],"_id":"optimist@0.1.5","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.2.16","_nodeVersion":"v0.3.8-pre","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"f5b85dd7ba7928224db268f668419ffb1e7d2cec","tarball":"http://localhost:1337/optimist/-/optimist-0.1.5.tgz"}},"0.1.6":{"name":"optimist","version":"0.1.6","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index","repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"keywords":["argument","option","parser","parsing"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":["node >=0.1.100"],"_id":"optimist@0.1.6","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.2.16","_nodeVersion":"v0.3.8-pre","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"0f2f671dfec3365509dc335f098158aa90c80100","tarball":"http://localhost:1337/optimist/-/optimist-0.1.6.tgz"}},"0.1.7":{"name":"optimist","version":"0.1.7","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","repository":{"type":"git","url":"git://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":["node >=0.1.100"],"_id":"optimist@0.1.7","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.15","_nodeVersion":"v0.4.2","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"f83a9644634d446bf3934518257d55dd6d08e183","tarball":"http://localhost:1337/optimist/-/optimist-0.1.7.tgz"}},"0.1.8":{"name":"optimist","version":"0.1.8","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","repository":{"type":"git","url":"git://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":["node >=0.1.100"],"_id":"optimist@0.1.8","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.15","_nodeVersion":"v0.4.2","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"58d0adde9d61db67dfbe2c7467da8abf9c86bc94","tarball":"http://localhost:1337/optimist/-/optimist-0.1.8.tgz"}},"0.1.9":{"name":"optimist","version":"0.1.9","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","repository":{"type":"git","url":"git://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":["node >=0.1.100"],"dependencies":{},"devDependencies":{},"_id":"optimist@0.1.9","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.1rc8","_nodeVersion":"v0.4.2","_defaultsLoaded":true,"dist":{"shasum":"d88fd79743a88960a418f5754b3b2157252447cc","tarball":"http://localhost:1337/optimist/-/optimist-0.1.9.tgz"},"directories":{}},"0.0.3":{"name":"optimist","version":"0.0.3","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./optimist.js","repository":{"type":"git","url":"git://github.com/substack/node-optimist.git"},"license":"MIT/X11","engine":["node >=0.1.100"],"dependencies":{},"devDependencies":{},"_id":"optimist@0.0.3","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.6","_nodeVersion":"v0.4.8-pre","_defaultsLoaded":true,"dist":{"shasum":"323a5c625b708e0197b72c106aef6444ada0c515","tarball":"http://localhost:1337/optimist/-/optimist-0.0.3.tgz"},"scripts":{},"directories":{}},"0.2.0":{"name":"optimist","version":"0.2.0","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","repository":{"type":"git","url":"git://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"dependencies":{},"devDependencies":{},"_id":"optimist@0.2.0","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.3","_nodeVersion":"v0.5.0-pre","_defaultsLoaded":true,"dist":{"shasum":"1cb5b0e727009370f324765e2a5245ac0d806bfd","tarball":"http://localhost:1337/optimist/-/optimist-0.2.0.tgz"},"scripts":{},"directories":{}},"0.2.1":{"name":"optimist","version":"0.2.1","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","repository":{"type":"git","url":"git://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"dependencies":{},"devDependencies":{},"_id":"optimist@0.2.1","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.3","_nodeVersion":"v0.5.0-pre","_defaultsLoaded":true,"dist":{"shasum":"80a2d75b660d467f673599dcbc69c113f289554a","tarball":"http://localhost:1337/optimist/-/optimist-0.2.1.tgz"},"scripts":{},"directories":{}},"0.2.2":{"name":"optimist","version":"0.2.2","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","directories":{"lib":".","test":"test","example":"examples"},"dependencies":{"wordwrap":">=0.0.1 <0.1"},"devDependencies":{"expresso":"=0.7.x"},"repository":{"type":"git","url":"git://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_id":"optimist@0.2.2","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.3","_nodeVersion":"v0.5.0-pre","_defaultsLoaded":true,"dist":{"shasum":"a6bb06ff1f8229a12ee9abcb8160eee35e629ef8","tarball":"http://localhost:1337/optimist/-/optimist-0.2.2.tgz"},"scripts":{}},"0.2.3":{"name":"optimist","version":"0.2.3","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","directories":{"lib":".","test":"test","example":"examples"},"dependencies":{"wordwrap":">=0.0.1 <0.1"},"devDependencies":{"expresso":"=0.7.x"},"repository":{"type":"git","url":"git://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_id":"optimist@0.2.3","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.3","_nodeVersion":"v0.5.0-pre","_defaultsLoaded":true,"dist":{"shasum":"dc259cc0e5d73e1f3fcc2dea3526e52f19ed740c","tarball":"http://localhost:1337/optimist/-/optimist-0.2.3.tgz"},"scripts":{}},"0.2.4":{"name":"optimist","version":"0.2.4","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","directories":{"lib":".","test":"test","example":"examples"},"dependencies":{"wordwrap":">=0.0.1 <0.1"},"devDependencies":{"hashish":"0.0.x","expresso":"=0.7.x"},"repository":{"type":"git","url":"git://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_id":"optimist@0.2.4","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.10","_nodeVersion":"v0.5.0-pre","_defaultsLoaded":true,"dist":{"shasum":"9d543b3444fe127e8c01891c11a38d20b886317b","tarball":"http://localhost:1337/optimist/-/optimist-0.2.4.tgz"},"scripts":{}},"0.2.5":{"name":"optimist","version":"0.2.5","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","directories":{"lib":".","test":"test","example":"examples"},"dependencies":{"wordwrap":">=0.0.1 <0.1"},"devDependencies":{"hashish":"0.0.x","expresso":"=0.7.x"},"repository":{"type":"git","url":"git://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_id":"optimist@0.2.5","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.10","_nodeVersion":"v0.5.0-pre","_defaultsLoaded":true,"dist":{"shasum":"50e0127b8443da18f4fdb756aaca446f1c65d136","tarball":"http://localhost:1337/optimist/-/optimist-0.2.5.tgz"},"scripts":{}},"0.2.6":{"name":"optimist","version":"0.2.6","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","directories":{"lib":".","test":"test","example":"examples"},"dependencies":{"wordwrap":">=0.0.1 <0.1"},"devDependencies":{"hashish":"0.0.x","expresso":"=0.7.x"},"repository":{"type":"git","url":"git://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_id":"optimist@0.2.6","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.10","_nodeVersion":"v0.5.0-pre","_defaultsLoaded":true,"dist":{"shasum":"c15b750c98274ea175d241b745edf4ddc88f177b","tarball":"http://localhost:1337/optimist/-/optimist-0.2.6.tgz"},"scripts":{}},"0.2.7":{"name":"optimist","version":"0.2.7","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","directories":{"lib":".","test":"test","example":"examples"},"dependencies":{"wordwrap":">=0.0.1 <0.1.0"},"devDependencies":{"hashish":"0.0.x","expresso":"0.7.x"},"repository":{"type":"git","url":"git://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_npmUser":{"name":"substack","email":"mail@substack.net"},"_id":"optimist@0.2.7","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.99","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"62945bcc760643d918a5c7649ade86e662144024","tarball":"http://localhost:1337/optimist/-/optimist-0.2.7.tgz"},"maintainers":[{"name":"substack","email":"mail@substack.net"}]},"0.2.8":{"name":"optimist","version":"0.2.8","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","directories":{"lib":".","test":"test","example":"examples"},"dependencies":{"wordwrap":">=0.0.1 <0.1.0"},"devDependencies":{"hashish":"0.0.x","expresso":"0.7.x"},"scripts":{"test":"expresso"},"repository":{"type":"git","url":"git://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_npmUser":{"name":"substack","email":"mail@substack.net"},"_id":"optimist@0.2.8","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.99","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"e981ab7e268b457948593b55674c099a815cac31","tarball":"http://localhost:1337/optimist/-/optimist-0.2.8.tgz"},"maintainers":[{"name":"substack","email":"mail@substack.net"}]},"0.3.0":{"name":"optimist","version":"0.3.0","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","directories":{"lib":".","test":"test","example":"examples"},"dependencies":{"wordwrap":">=0.0.1 <0.1.0"},"devDependencies":{"hashish":"0.0.x","expresso":"0.7.x"},"scripts":{"test":"expresso"},"repository":{"type":"git","url":"git://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_npmUser":{"name":"substack","email":"mail@substack.net"},"_id":"optimist@0.3.0","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"4458c1f02acf1e5c9ece36ce2fd4d338e56ee0f6","tarball":"http://localhost:1337/optimist/-/optimist-0.3.0.tgz"},"maintainers":[{"name":"substack","email":"mail@substack.net"}]},"0.3.1":{"name":"optimist","version":"0.3.1","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","directories":{"lib":".","test":"test","example":"examples"},"dependencies":{"wordwrap":">=0.0.1 <0.1.0"},"devDependencies":{"hashish":"0.0.x","expresso":"0.7.x"},"scripts":{"test":"expresso"},"repository":{"type":"git","url":"git://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_npmUser":{"name":"substack","email":"mail@substack.net"},"_id":"optimist@0.3.1","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"6680d30560193af5a55eb64394883ed7bcb98f2e","tarball":"http://localhost:1337/optimist/-/optimist-0.3.1.tgz"},"maintainers":[{"name":"substack","email":"mail@substack.net"}]},"0.3.3":{"name":"optimist","version":"0.3.3","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","directories":{"lib":".","test":"test","example":"example"},"dependencies":{"wordwrap":"~0.0.2"},"devDependencies":{"hashish":"~0.0.4","tap":"~0.2.4"},"scripts":{"test":"tap ./test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_npmUser":{"name":"substack","email":"mail@substack.net"},"_id":"optimist@0.3.3","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"d75701d48f37fe0e6f06f88e7b0cf0882a3ce394","tarball":"http://localhost:1337/optimist/-/optimist-0.3.3.tgz"},"readme":"","maintainers":[{"name":"substack","email":"mail@substack.net"}]},"0.3.4":{"name":"optimist","version":"0.3.4","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","directories":{"lib":".","test":"test","example":"example"},"dependencies":{"wordwrap":"~0.0.2"},"devDependencies":{"hashish":"~0.0.4","tap":"~0.2.4"},"scripts":{"test":"tap ./test/*.js"},"repository":{"type":"git","url":"git://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"_npmUser":{"name":"substack","email":"mail@substack.net"},"_id":"optimist@0.3.4","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"4d6d0bd71ffad0da4ba4f6d876d5eeb04e07480b","tarball":"http://localhost:1337/optimist/-/optimist-0.3.4.tgz"},"readme":"","maintainers":[{"name":"substack","email":"mail@substack.net"}]},"0.3.5":{"name":"optimist","version":"0.3.5","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","directories":{"lib":".","test":"test","example":"example"},"dependencies":{"wordwrap":"~0.0.2"},"devDependencies":{"hashish":"~0.0.4","tap":"~0.2.4"},"scripts":{"test":"tap ./test/*.js"},"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"readme":"optimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\n[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist)\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n    console.log('Buy more riffiwobbles');\n}\nelse {\n    console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n    $ ./xup.js --rif=55 --xup=9.52\n    Buy more riffiwobbles\n    \n    $ ./xup.js --rif 12 --xup 8.1\n    Sell the xupptumblers\n\n![This one's optimistic.](http://substack.net/images/optimistic.png)\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n    $ ./short.js -x 10 -y 21\n    (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n    util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n    (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n    $ ./bool.js -s\n    The cat says: meow\n    \n    $ ./bool.js -sp\n    The cat says: meow.\n\n    $ ./bool.js -sp --fr\n    Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n    $ ./nonopt.js -x 6.82 -y 3.35 moo\n    (6.82,3.35)\n    [ 'moo' ]\n    \n    $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n    (0.54,1.12)\n    [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .usage('Usage: $0 -x [num] -y [num]')\n    .demand(['x','y'])\n    .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n    $ ./divide.js -x 55 -y 11\n    5\n    \n    $ node ./divide.js -x 4.91 -z 2.51\n    Usage: node ./divide.js -x [num] -y [num]\n\n    Options:\n      -x  [required]\n      -y  [required]\n\n    Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .default('x', 10)\n    .default('y', 10)\n    .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n    $ ./default_singles.js -x 5\n    15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .default({ x : 10, y : 10 })\n    .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n    $ ./default_hash.js -y 7\n    17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .boolean('v')\n    .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n    $ ./boolean_single.js -v foo bar baz\n    true\n    [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .boolean(['x','y','z'])\n    .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n    $ ./boolean_double.js -x -z one two three\n    [ true, false, true ]\n    [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .usage('Count the lines in a file.\\nUsage: $0')\n    .demand('f')\n    .alias('f', 'file')\n    .describe('f', 'Load a file')\n    .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n    lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n    console.log(lines);\n});\n````\n\n***\n\n    $ node line_count.js\n    Count the lines in a file.\n    Usage: node ./line_count.js\n\n    Options:\n      -f, --file  Load a file  [required]\n\n    Missing required arguments: f\n\n    $ node line_count.js --file line_count.js \n    20\n    \n    $ node line_count.js -f line_count.js \n    20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n    .options('f', {\n        alias : 'file',\n        default : '/etc/passwd',\n    })\n    .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n    .alias('f', 'file')\n    .default('f', '/etc/passwd')\n    .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n    $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n    { _: [ '-c', '3', '-d', '4' ],\n      '$0': 'node ./examples/reflect.js',\n      a: 1,\n      b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n    $ node examples/reflect.js -a --no-b\n    { _: [],\n      '$0': 'node ./examples/reflect.js',\n      a: true,\n      b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n    $ node examples/reflect.js -x 5 -x 8 -x 0\n    { _: [],\n      '$0': 'node ./examples/reflect.js',\n        x: [ 5, 8, 0 ] }\n\ndot notation\n------------\n\nWhen you use dots (`.`s) in argument names, an implicit object path is assumed.\nThis lets you organize arguments into nested objects.\n\n     $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5\n     { _: [],\n       '$0': 'node ./examples/reflect.js',\n         foo: { bar: { baz: 33 }, quux: 5 } }\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n    npm install optimist\n \nor clone this project on github:\n\n    git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n    \n    expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n","_id":"optimist@0.3.5","dist":{"shasum":"03654b52417030312d109f39b159825b60309304","tarball":"http://localhost:1337/optimist/-/optimist-0.3.5.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}]},"0.3.6":{"name":"optimist","version":"0.3.6","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","dependencies":{"wordwrap":"~0.0.2"},"devDependencies":{"hashish":"~0.0.4","tap":"~0.4.0"},"scripts":{"test":"tap ./test/*.js"},"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"readme":"optimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\n[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist)\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n    console.log('Buy more riffiwobbles');\n}\nelse {\n    console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n    $ ./xup.js --rif=55 --xup=9.52\n    Buy more riffiwobbles\n    \n    $ ./xup.js --rif 12 --xup 8.1\n    Sell the xupptumblers\n\n![This one's optimistic.](http://substack.net/images/optimistic.png)\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n    $ ./short.js -x 10 -y 21\n    (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n    util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n    (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n    $ ./bool.js -s\n    The cat says: meow\n    \n    $ ./bool.js -sp\n    The cat says: meow.\n\n    $ ./bool.js -sp --fr\n    Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n    $ ./nonopt.js -x 6.82 -y 3.35 moo\n    (6.82,3.35)\n    [ 'moo' ]\n    \n    $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n    (0.54,1.12)\n    [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .usage('Usage: $0 -x [num] -y [num]')\n    .demand(['x','y'])\n    .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n    $ ./divide.js -x 55 -y 11\n    5\n    \n    $ node ./divide.js -x 4.91 -z 2.51\n    Usage: node ./divide.js -x [num] -y [num]\n\n    Options:\n      -x  [required]\n      -y  [required]\n\n    Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .default('x', 10)\n    .default('y', 10)\n    .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n    $ ./default_singles.js -x 5\n    15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .default({ x : 10, y : 10 })\n    .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n    $ ./default_hash.js -y 7\n    17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .boolean('v')\n    .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n    $ ./boolean_single.js -v foo bar baz\n    true\n    [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .boolean(['x','y','z'])\n    .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n    $ ./boolean_double.js -x -z one two three\n    [ true, false, true ]\n    [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .usage('Count the lines in a file.\\nUsage: $0')\n    .demand('f')\n    .alias('f', 'file')\n    .describe('f', 'Load a file')\n    .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n    lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n    console.log(lines);\n});\n````\n\n***\n\n    $ node line_count.js\n    Count the lines in a file.\n    Usage: node ./line_count.js\n\n    Options:\n      -f, --file  Load a file  [required]\n\n    Missing required arguments: f\n\n    $ node line_count.js --file line_count.js \n    20\n    \n    $ node line_count.js -f line_count.js \n    20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n    .options('f', {\n        alias : 'file',\n        default : '/etc/passwd',\n    })\n    .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n    .alias('f', 'file')\n    .default('f', '/etc/passwd')\n    .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n    $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n    { _: [ '-c', '3', '-d', '4' ],\n      '$0': 'node ./examples/reflect.js',\n      a: 1,\n      b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n    $ node examples/reflect.js -a --no-b\n    { _: [],\n      '$0': 'node ./examples/reflect.js',\n      a: true,\n      b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n    $ node examples/reflect.js -x 5 -x 8 -x 0\n    { _: [],\n      '$0': 'node ./examples/reflect.js',\n        x: [ 5, 8, 0 ] }\n\ndot notation\n------------\n\nWhen you use dots (`.`s) in argument names, an implicit object path is assumed.\nThis lets you organize arguments into nested objects.\n\n     $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5\n     { _: [],\n       '$0': 'node ./examples/reflect.js',\n         foo: { bar: { baz: 33 }, quux: 5 } }\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n    npm install optimist\n \nor clone this project on github:\n\n    git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n    \n    expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n","readmeFilename":"readme.markdown","_id":"optimist@0.3.6","dist":{"shasum":"816e0039f848fccf9db70cada5535ed9dd55f496","tarball":"http://localhost:1337/optimist/-/optimist-0.3.6.tgz"},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"0.3.7":{"name":"optimist","version":"0.3.7","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","dependencies":{"wordwrap":"~0.0.2"},"devDependencies":{"hashish":"~0.0.4","tap":"~0.4.0"},"scripts":{"test":"tap ./test/*.js"},"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"readme":"optimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\n[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist)\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n    console.log('Buy more riffiwobbles');\n}\nelse {\n    console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n    $ ./xup.js --rif=55 --xup=9.52\n    Buy more riffiwobbles\n    \n    $ ./xup.js --rif 12 --xup 8.1\n    Sell the xupptumblers\n\n![This one's optimistic.](http://substack.net/images/optimistic.png)\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n    $ ./short.js -x 10 -y 21\n    (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n    util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n    (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n    $ ./bool.js -s\n    The cat says: meow\n    \n    $ ./bool.js -sp\n    The cat says: meow.\n\n    $ ./bool.js -sp --fr\n    Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n    $ ./nonopt.js -x 6.82 -y 3.35 moo\n    (6.82,3.35)\n    [ 'moo' ]\n    \n    $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n    (0.54,1.12)\n    [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .usage('Usage: $0 -x [num] -y [num]')\n    .demand(['x','y'])\n    .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n    $ ./divide.js -x 55 -y 11\n    5\n    \n    $ node ./divide.js -x 4.91 -z 2.51\n    Usage: node ./divide.js -x [num] -y [num]\n\n    Options:\n      -x  [required]\n      -y  [required]\n\n    Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .default('x', 10)\n    .default('y', 10)\n    .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n    $ ./default_singles.js -x 5\n    15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .default({ x : 10, y : 10 })\n    .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n    $ ./default_hash.js -y 7\n    17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .boolean('v')\n    .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n    $ ./boolean_single.js -v foo bar baz\n    true\n    [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .boolean(['x','y','z'])\n    .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n    $ ./boolean_double.js -x -z one two three\n    [ true, false, true ]\n    [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .usage('Count the lines in a file.\\nUsage: $0')\n    .demand('f')\n    .alias('f', 'file')\n    .describe('f', 'Load a file')\n    .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n    lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n    console.log(lines);\n});\n````\n\n***\n\n    $ node line_count.js\n    Count the lines in a file.\n    Usage: node ./line_count.js\n\n    Options:\n      -f, --file  Load a file  [required]\n\n    Missing required arguments: f\n\n    $ node line_count.js --file line_count.js \n    20\n    \n    $ node line_count.js -f line_count.js \n    20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n    .options('f', {\n        alias : 'file',\n        default : '/etc/passwd',\n    })\n    .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n    .alias('f', 'file')\n    .default('f', '/etc/passwd')\n    .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n    $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n    { _: [ '-c', '3', '-d', '4' ],\n      '$0': 'node ./examples/reflect.js',\n      a: 1,\n      b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n    $ node examples/reflect.js -a --no-b\n    { _: [],\n      '$0': 'node ./examples/reflect.js',\n      a: true,\n      b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n    $ node examples/reflect.js -x 5 -x 8 -x 0\n    { _: [],\n      '$0': 'node ./examples/reflect.js',\n        x: [ 5, 8, 0 ] }\n\ndot notation\n------------\n\nWhen you use dots (`.`s) in argument names, an implicit object path is assumed.\nThis lets you organize arguments into nested objects.\n\n     $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5\n     { _: [],\n       '$0': 'node ./examples/reflect.js',\n         foo: { bar: { baz: 33 }, quux: 5 } }\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n    npm install optimist\n \nor clone this project on github:\n\n    git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n    \n    expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n","readmeFilename":"readme.markdown","_id":"optimist@0.3.7","dist":{"shasum":"c90941ad59e4273328923074d2cf2e7cbc6ec0d9","tarball":"http://localhost:1337/optimist/-/optimist-0.3.7.tgz"},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"0.4.0":{"name":"optimist","version":"0.4.0","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","dependencies":{"wordwrap":"~0.0.2"},"devDependencies":{"hashish":"~0.0.4","tap":"~0.4.0"},"scripts":{"test":"tap ./test/*.js"},"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"readme":"optimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\n[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist)\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n    console.log('Buy more riffiwobbles');\n}\nelse {\n    console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n    $ ./xup.js --rif=55 --xup=9.52\n    Buy more riffiwobbles\n    \n    $ ./xup.js --rif 12 --xup 8.1\n    Sell the xupptumblers\n\n![This one's optimistic.](http://substack.net/images/optimistic.png)\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n    $ ./short.js -x 10 -y 21\n    (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n    util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n    (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n    $ ./bool.js -s\n    The cat says: meow\n    \n    $ ./bool.js -sp\n    The cat says: meow.\n\n    $ ./bool.js -sp --fr\n    Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n    $ ./nonopt.js -x 6.82 -y 3.35 moo\n    (6.82,3.35)\n    [ 'moo' ]\n    \n    $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n    (0.54,1.12)\n    [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .usage('Usage: $0 -x [num] -y [num]')\n    .demand(['x','y'])\n    .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n    $ ./divide.js -x 55 -y 11\n    5\n    \n    $ node ./divide.js -x 4.91 -z 2.51\n    Usage: node ./divide.js -x [num] -y [num]\n\n    Options:\n      -x  [required]\n      -y  [required]\n\n    Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .default('x', 10)\n    .default('y', 10)\n    .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n    $ ./default_singles.js -x 5\n    15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .default({ x : 10, y : 10 })\n    .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n    $ ./default_hash.js -y 7\n    17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .boolean('v')\n    .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n    $ ./boolean_single.js -v foo bar baz\n    true\n    [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .boolean(['x','y','z'])\n    .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n    $ ./boolean_double.js -x -z one two three\n    [ true, false, true ]\n    [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .usage('Count the lines in a file.\\nUsage: $0')\n    .demand('f')\n    .alias('f', 'file')\n    .describe('f', 'Load a file')\n    .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n    lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n    console.log(lines);\n});\n````\n\n***\n\n    $ node line_count.js\n    Count the lines in a file.\n    Usage: node ./line_count.js\n\n    Options:\n      -f, --file  Load a file  [required]\n\n    Missing required arguments: f\n\n    $ node line_count.js --file line_count.js \n    20\n    \n    $ node line_count.js -f line_count.js \n    20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n    .options('f', {\n        alias : 'file',\n        default : '/etc/passwd',\n    })\n    .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n    .alias('f', 'file')\n    .default('f', '/etc/passwd')\n    .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n    $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n    { _: [ '-c', '3', '-d', '4' ],\n      '$0': 'node ./examples/reflect.js',\n      a: 1,\n      b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n    $ node examples/reflect.js -a --no-b\n    { _: [],\n      '$0': 'node ./examples/reflect.js',\n      a: true,\n      b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n    $ node examples/reflect.js -x 5 -x 8 -x 0\n    { _: [],\n      '$0': 'node ./examples/reflect.js',\n        x: [ 5, 8, 0 ] }\n\ndot notation\n------------\n\nWhen you use dots (`.`s) in argument names, an implicit object path is assumed.\nThis lets you organize arguments into nested objects.\n\n     $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5\n     { _: [],\n       '$0': 'node ./examples/reflect.js',\n         foo: { bar: { baz: 33 }, quux: 5 } }\n\nshort numbers\n-------------\n\nShort numeric `head -n5` style argument work too:\n\n    $ node reflect.js -n123 -m456\n    { '3': true,\n      '6': true,\n      _: [],\n      '$0': 'node ./reflect.js',\n      n: 123,\n      m: 456 }\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n    npm install optimist\n \nor clone this project on github:\n\n    git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n    \n    expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n","readmeFilename":"readme.markdown","_id":"optimist@0.4.0","dist":{"shasum":"cb8ec37f2fe3aa9864cb67a275250e7e19620a25","tarball":"http://localhost:1337/optimist/-/optimist-0.4.0.tgz"},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"0.5.0":{"name":"optimist","version":"0.5.0","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","dependencies":{"wordwrap":"~0.0.2"},"devDependencies":{"hashish":"~0.0.4","tap":"~0.4.0"},"scripts":{"test":"tap ./test/*.js"},"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"readme":"optimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\n[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist)\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n    console.log('Buy more riffiwobbles');\n}\nelse {\n    console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n    $ ./xup.js --rif=55 --xup=9.52\n    Buy more riffiwobbles\n    \n    $ ./xup.js --rif 12 --xup 8.1\n    Sell the xupptumblers\n\n![This one's optimistic.](http://substack.net/images/optimistic.png)\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n    $ ./short.js -x 10 -y 21\n    (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n    util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n    (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n    $ ./bool.js -s\n    The cat says: meow\n    \n    $ ./bool.js -sp\n    The cat says: meow.\n\n    $ ./bool.js -sp --fr\n    Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n    $ ./nonopt.js -x 6.82 -y 3.35 moo\n    (6.82,3.35)\n    [ 'moo' ]\n    \n    $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n    (0.54,1.12)\n    [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .usage('Usage: $0 -x [num] -y [num]')\n    .demand(['x','y'])\n    .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n    $ ./divide.js -x 55 -y 11\n    5\n    \n    $ node ./divide.js -x 4.91 -z 2.51\n    Usage: node ./divide.js -x [num] -y [num]\n\n    Options:\n      -x  [required]\n      -y  [required]\n\n    Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .default('x', 10)\n    .default('y', 10)\n    .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n    $ ./default_singles.js -x 5\n    15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .default({ x : 10, y : 10 })\n    .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n    $ ./default_hash.js -y 7\n    17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .boolean('v')\n    .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n    $ ./boolean_single.js -v foo bar baz\n    true\n    [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .boolean(['x','y','z'])\n    .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n    $ ./boolean_double.js -x -z one two three\n    [ true, false, true ]\n    [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .usage('Count the lines in a file.\\nUsage: $0')\n    .demand('f')\n    .alias('f', 'file')\n    .describe('f', 'Load a file')\n    .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n    lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n    console.log(lines);\n});\n````\n\n***\n\n    $ node line_count.js\n    Count the lines in a file.\n    Usage: node ./line_count.js\n\n    Options:\n      -f, --file  Load a file  [required]\n\n    Missing required arguments: f\n\n    $ node line_count.js --file line_count.js \n    20\n    \n    $ node line_count.js -f line_count.js \n    20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n    .options('f', {\n        alias : 'file',\n        default : '/etc/passwd',\n    })\n    .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n    .alias('f', 'file')\n    .default('f', '/etc/passwd')\n    .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n    $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n    { _: [ '-c', '3', '-d', '4' ],\n      '$0': 'node ./examples/reflect.js',\n      a: 1,\n      b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n    $ node examples/reflect.js -a --no-b\n    { _: [],\n      '$0': 'node ./examples/reflect.js',\n      a: true,\n      b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n    $ node examples/reflect.js -x 5 -x 8 -x 0\n    { _: [],\n      '$0': 'node ./examples/reflect.js',\n        x: [ 5, 8, 0 ] }\n\ndot notation\n------------\n\nWhen you use dots (`.`s) in argument names, an implicit object path is assumed.\nThis lets you organize arguments into nested objects.\n\n     $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5\n     { _: [],\n       '$0': 'node ./examples/reflect.js',\n         foo: { bar: { baz: 33 }, quux: 5 } }\n\nshort numbers\n-------------\n\nShort numeric `head -n5` style argument work too:\n\n    $ node reflect.js -n123 -m456\n    { '3': true,\n      '6': true,\n      _: [],\n      '$0': 'node ./reflect.js',\n      n: 123,\n      m: 456 }\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n    npm install optimist\n \nor clone this project on github:\n\n    git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n    \n    expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n","readmeFilename":"readme.markdown","_id":"optimist@0.5.0","dist":{"shasum":"d9c60da4c34811418d183390623f8046f134a2d4","tarball":"http://localhost:1337/optimist/-/optimist-0.5.0.tgz"},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"0.5.1":{"name":"optimist","version":"0.5.1","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","dependencies":{"wordwrap":"~0.0.2"},"devDependencies":{"hashish":"~0.0.4","tap":"~0.4.0"},"scripts":{"test":"tap ./test/*.js"},"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"readme":"optimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\n[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist)\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n    console.log('Buy more riffiwobbles');\n}\nelse {\n    console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n    $ ./xup.js --rif=55 --xup=9.52\n    Buy more riffiwobbles\n    \n    $ ./xup.js --rif 12 --xup 8.1\n    Sell the xupptumblers\n\n![This one's optimistic.](http://substack.net/images/optimistic.png)\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n    $ ./short.js -x 10 -y 21\n    (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n    util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n    (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n    $ ./bool.js -s\n    The cat says: meow\n    \n    $ ./bool.js -sp\n    The cat says: meow.\n\n    $ ./bool.js -sp --fr\n    Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n    $ ./nonopt.js -x 6.82 -y 3.35 moo\n    (6.82,3.35)\n    [ 'moo' ]\n    \n    $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n    (0.54,1.12)\n    [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .usage('Usage: $0 -x [num] -y [num]')\n    .demand(['x','y'])\n    .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n    $ ./divide.js -x 55 -y 11\n    5\n    \n    $ node ./divide.js -x 4.91 -z 2.51\n    Usage: node ./divide.js -x [num] -y [num]\n\n    Options:\n      -x  [required]\n      -y  [required]\n\n    Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .default('x', 10)\n    .default('y', 10)\n    .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n    $ ./default_singles.js -x 5\n    15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .default({ x : 10, y : 10 })\n    .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n    $ ./default_hash.js -y 7\n    17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .boolean('v')\n    .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n    $ ./boolean_single.js -v foo bar baz\n    true\n    [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .boolean(['x','y','z'])\n    .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n    $ ./boolean_double.js -x -z one two three\n    [ true, false, true ]\n    [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .usage('Count the lines in a file.\\nUsage: $0')\n    .demand('f')\n    .alias('f', 'file')\n    .describe('f', 'Load a file')\n    .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n    lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n    console.log(lines);\n});\n````\n\n***\n\n    $ node line_count.js\n    Count the lines in a file.\n    Usage: node ./line_count.js\n\n    Options:\n      -f, --file  Load a file  [required]\n\n    Missing required arguments: f\n\n    $ node line_count.js --file line_count.js \n    20\n    \n    $ node line_count.js -f line_count.js \n    20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n    .options('f', {\n        alias : 'file',\n        default : '/etc/passwd',\n    })\n    .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n    .alias('f', 'file')\n    .default('f', '/etc/passwd')\n    .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n    $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n    { _: [ '-c', '3', '-d', '4' ],\n      '$0': 'node ./examples/reflect.js',\n      a: 1,\n      b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n    $ node examples/reflect.js -a --no-b\n    { _: [],\n      '$0': 'node ./examples/reflect.js',\n      a: true,\n      b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n    $ node examples/reflect.js -x 5 -x 8 -x 0\n    { _: [],\n      '$0': 'node ./examples/reflect.js',\n        x: [ 5, 8, 0 ] }\n\ndot notation\n------------\n\nWhen you use dots (`.`s) in argument names, an implicit object path is assumed.\nThis lets you organize arguments into nested objects.\n\n     $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5\n     { _: [],\n       '$0': 'node ./examples/reflect.js',\n         foo: { bar: { baz: 33 }, quux: 5 } }\n\nshort numbers\n-------------\n\nShort numeric `head -n5` style argument work too:\n\n    $ node reflect.js -n123 -m456\n    { '3': true,\n      '6': true,\n      _: [],\n      '$0': 'node ./reflect.js',\n      n: 123,\n      m: 456 }\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n    npm install optimist\n \nor clone this project on github:\n\n    git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n    \n    expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n","readmeFilename":"readme.markdown","_id":"optimist@0.5.1","dist":{"shasum":"9f6a34014ca8344a60a5d39734436f49d2bbe4f5","tarball":"http://localhost:1337/optimist/-/optimist-0.5.1.tgz"},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"0.5.2":{"name":"optimist","version":"0.5.2","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","dependencies":{"wordwrap":"~0.0.2"},"devDependencies":{"hashish":"~0.0.4","tap":"~0.4.0"},"scripts":{"test":"tap ./test/*.js"},"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"readme":"optimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\n[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist)\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n    console.log('Buy more riffiwobbles');\n}\nelse {\n    console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n    $ ./xup.js --rif=55 --xup=9.52\n    Buy more riffiwobbles\n    \n    $ ./xup.js --rif 12 --xup 8.1\n    Sell the xupptumblers\n\n![This one's optimistic.](http://substack.net/images/optimistic.png)\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n    $ ./short.js -x 10 -y 21\n    (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n    util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n    (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n    $ ./bool.js -s\n    The cat says: meow\n    \n    $ ./bool.js -sp\n    The cat says: meow.\n\n    $ ./bool.js -sp --fr\n    Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n    $ ./nonopt.js -x 6.82 -y 3.35 moo\n    (6.82,3.35)\n    [ 'moo' ]\n    \n    $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n    (0.54,1.12)\n    [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .usage('Usage: $0 -x [num] -y [num]')\n    .demand(['x','y'])\n    .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n    $ ./divide.js -x 55 -y 11\n    5\n    \n    $ node ./divide.js -x 4.91 -z 2.51\n    Usage: node ./divide.js -x [num] -y [num]\n\n    Options:\n      -x  [required]\n      -y  [required]\n\n    Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .default('x', 10)\n    .default('y', 10)\n    .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n    $ ./default_singles.js -x 5\n    15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .default({ x : 10, y : 10 })\n    .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n    $ ./default_hash.js -y 7\n    17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .boolean('v')\n    .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n    $ ./boolean_single.js -v foo bar baz\n    true\n    [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .boolean(['x','y','z'])\n    .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n    $ ./boolean_double.js -x -z one two three\n    [ true, false, true ]\n    [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .usage('Count the lines in a file.\\nUsage: $0')\n    .demand('f')\n    .alias('f', 'file')\n    .describe('f', 'Load a file')\n    .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n    lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n    console.log(lines);\n});\n````\n\n***\n\n    $ node line_count.js\n    Count the lines in a file.\n    Usage: node ./line_count.js\n\n    Options:\n      -f, --file  Load a file  [required]\n\n    Missing required arguments: f\n\n    $ node line_count.js --file line_count.js \n    20\n    \n    $ node line_count.js -f line_count.js \n    20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n    .options('f', {\n        alias : 'file',\n        default : '/etc/passwd',\n    })\n    .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n    .alias('f', 'file')\n    .default('f', '/etc/passwd')\n    .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n    $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n    { _: [ '-c', '3', '-d', '4' ],\n      '$0': 'node ./examples/reflect.js',\n      a: 1,\n      b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n    $ node examples/reflect.js -a --no-b\n    { _: [],\n      '$0': 'node ./examples/reflect.js',\n      a: true,\n      b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n    $ node examples/reflect.js -x 5 -x 8 -x 0\n    { _: [],\n      '$0': 'node ./examples/reflect.js',\n        x: [ 5, 8, 0 ] }\n\ndot notation\n------------\n\nWhen you use dots (`.`s) in argument names, an implicit object path is assumed.\nThis lets you organize arguments into nested objects.\n\n     $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5\n     { _: [],\n       '$0': 'node ./examples/reflect.js',\n         foo: { bar: { baz: 33 }, quux: 5 } }\n\nshort numbers\n-------------\n\nShort numeric `head -n5` style argument work too:\n\n    $ node reflect.js -n123 -m456\n    { '3': true,\n      '6': true,\n      _: [],\n      '$0': 'node ./reflect.js',\n      n: 123,\n      m: 456 }\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n    npm install optimist\n \nor clone this project on github:\n\n    git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n    \n    expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n","readmeFilename":"readme.markdown","_id":"optimist@0.5.2","dist":{"shasum":"85c8c1454b3315e4a78947e857b1df033450bfbc","tarball":"http://localhost:1337/optimist/-/optimist-0.5.2.tgz"},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}},"0.6.0":{"name":"optimist","version":"0.6.0","description":"Light-weight option parsing with an argv hash. No optstrings attached.","main":"./index.js","dependencies":{"wordwrap":"~0.0.2","minimist":"~0.0.1"},"devDependencies":{"hashish":"~0.0.4","tap":"~0.4.0"},"scripts":{"test":"tap ./test/*.js"},"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"keywords":["argument","args","option","parser","parsing","cli","command"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","engine":{"node":">=0.4"},"readme":"optimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\n[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist)\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n    console.log('Buy more riffiwobbles');\n}\nelse {\n    console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n    $ ./xup.js --rif=55 --xup=9.52\n    Buy more riffiwobbles\n    \n    $ ./xup.js --rif 12 --xup 8.1\n    Sell the xupptumblers\n\n![This one's optimistic.](http://substack.net/images/optimistic.png)\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n    $ ./short.js -x 10 -y 21\n    (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n    util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n    (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n    $ ./bool.js -s\n    The cat says: meow\n    \n    $ ./bool.js -sp\n    The cat says: meow.\n\n    $ ./bool.js -sp --fr\n    Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n    $ ./nonopt.js -x 6.82 -y 3.35 moo\n    (6.82,3.35)\n    [ 'moo' ]\n    \n    $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n    (0.54,1.12)\n    [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .usage('Usage: $0 -x [num] -y [num]')\n    .demand(['x','y'])\n    .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n    $ ./divide.js -x 55 -y 11\n    5\n    \n    $ node ./divide.js -x 4.91 -z 2.51\n    Usage: node ./divide.js -x [num] -y [num]\n\n    Options:\n      -x  [required]\n      -y  [required]\n\n    Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .default('x', 10)\n    .default('y', 10)\n    .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n    $ ./default_singles.js -x 5\n    15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .default({ x : 10, y : 10 })\n    .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n    $ ./default_hash.js -y 7\n    17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .boolean('v')\n    .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n    $ ./boolean_single.js -v foo bar baz\n    true\n    [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .boolean(['x','y','z'])\n    .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n    $ ./boolean_double.js -x -z one two three\n    [ true, false, true ]\n    [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n    .usage('Count the lines in a file.\\nUsage: $0')\n    .demand('f')\n    .alias('f', 'file')\n    .describe('f', 'Load a file')\n    .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n    lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n    console.log(lines);\n});\n````\n\n***\n\n    $ node line_count.js\n    Count the lines in a file.\n    Usage: node ./line_count.js\n\n    Options:\n      -f, --file  Load a file  [required]\n\n    Missing required arguments: f\n\n    $ node line_count.js --file line_count.js \n    20\n    \n    $ node line_count.js -f line_count.js \n    20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n    .options('f', {\n        alias : 'file',\n        default : '/etc/passwd',\n    })\n    .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n    .alias('f', 'file')\n    .default('f', '/etc/passwd')\n    .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n    $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n    { _: [ '-c', '3', '-d', '4' ],\n      '$0': 'node ./examples/reflect.js',\n      a: 1,\n      b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n    $ node examples/reflect.js -a --no-b\n    { _: [],\n      '$0': 'node ./examples/reflect.js',\n      a: true,\n      b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n    $ node examples/reflect.js -x 5 -x 8 -x 0\n    { _: [],\n      '$0': 'node ./examples/reflect.js',\n        x: [ 5, 8, 0 ] }\n\ndot notation\n------------\n\nWhen you use dots (`.`s) in argument names, an implicit object path is assumed.\nThis lets you organize arguments into nested objects.\n\n     $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5\n     { _: [],\n       '$0': 'node ./examples/reflect.js',\n         foo: { bar: { baz: 33 }, quux: 5 } }\n\nshort numbers\n-------------\n\nShort numeric `head -n5` style argument work too:\n\n    $ node reflect.js -n123 -m456\n    { '3': true,\n      '6': true,\n      _: [],\n      '$0': 'node ./reflect.js',\n      n: 123,\n      m: 456 }\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n    npm install optimist\n \nor clone this project on github:\n\n    git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n    \n    expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n","readmeFilename":"readme.markdown","bugs":{"url":"https://github.com/substack/node-optimist/issues"},"_id":"optimist@0.6.0","dist":{"shasum":"69424826f3405f79f142e6fc3d9ae58d4dbb9200","tarball":"http://localhost:1337/optimist/-/optimist-0.6.0.tgz"},"_from":".","_npmVersion":"1.3.0","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{}}},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"repository":{"type":"git","url":"http://github.com/substack/node-optimist.git"},"description":"Light-weight option parsing with an argv hash. No optstrings attached.","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"time":{"0.0.1":"2010-12-21T14:33:53.354Z","0.0.2":"2010-12-21T14:33:53.354Z","0.0.3":"2010-12-21T14:33:53.354Z","0.0.4":"2010-12-21T14:33:53.354Z","0.0.5":"2010-12-21T14:33:53.354Z","0.0.6":"2010-12-21T14:33:53.354Z","0.0.7":"2010-12-21T14:33:53.354Z","0.1.0":"2010-12-21T14:33:53.354Z","0.1.1":"2010-12-21T14:33:53.354Z","0.1.2":"2010-12-21T14:33:53.354Z","0.1.3":"2010-12-21T14:33:53.354Z","0.1.4":"2011-01-30T07:04:28.963Z","0.1.5":"2011-02-01T08:01:38.160Z","0.1.6":"2011-02-13T23:35:31.427Z","0.1.7":"2011-03-28T05:44:30.304Z","0.1.8":"2011-03-28T21:03:46.234Z","0.1.9":"2011-04-14T03:33:37.811Z","0.2.0":"2011-05-08T03:32:40.650Z","0.2.1":"2011-05-16T07:14:37.232Z","0.2.2":"2011-05-16T09:20:48.490Z","0.2.3":"2011-05-16T19:03:41.732Z","0.2.4":"2011-06-13T04:00:46.046Z","0.2.5":"2011-06-25T22:24:50.361Z","0.2.6":"2011-07-14T21:41:44.257Z","0.2.7":"2011-10-20T02:25:41.335Z","0.2.8":"2011-10-20T03:47:03.659Z","0.3.0":"2011-12-09T08:22:35.261Z","0.3.1":"2011-12-31T08:45:18.568Z","0.3.3":"2012-04-30T06:46:32.091Z","0.3.4":"2012-04-30T06:59:33.018Z","0.3.5":"2012-10-10T11:12:31.230Z","0.3.6":"2013-04-04T04:06:39.393Z","0.3.7":"2013-04-04T04:09:40.361Z","0.4.0":"2013-04-13T19:05:38.560Z","0.5.0":"2013-05-18T22:00:22.299Z","0.5.1":"2013-05-30T07:17:29.830Z","0.5.2":"2013-05-31T03:46:50.271Z","0.6.0":"2013-06-25T08:49:19.511Z"},"users":{"avianflu":true,"mvolkmann":true,"naholyr":true,"vtsvang":true,"linus":true,"pvorb":true,"matthiasg":true,"dshaw":true,"thlorenz":true,"MattiSG":true,"fgribreau":true,"clux":true,"hughsk":true,"pid":true,"gillesruppert":true,"jswartwood":true,"tokuhirom":true,"kennethjor":true,"chevex":true,"tivac":true,"konklone":true,"hij1nx":true,"luk":true,"booyaa":true,"megadrive":true,"nrn":true,"kastor":true,"joshthegeek":true,"charmander":true,"zaphod1984":true,"ljharb":true,"everywhere.js":true,"fiveisprime":true,"florianwendelborn":true,"lexa":true,"nak2k":true,"spekkionu":true,"conradz":true,"leesei":true,"pana":true},"_attachments":{"optimist-0.6.0.tgz":{"content_type":"application/octet-stream","revpos":132,"digest":"md5-I0ZgAx6amh/JRlF/tCQh0A==","length":12142,"stub":true},"optimist-0.5.2.tgz":{"content_type":"application/octet-stream","revpos":129,"digest":"md5-meoV8NdbCXOtbQcUb7qjUA==","length":13233,"stub":true},"optimist-0.5.1.tgz":{"content_type":"application/octet-stream","revpos":127,"digest":"md5-gE3NkJCbcKOoRQ1uMWn2nw==","length":13087,"stub":true},"optimist-0.5.0.tgz":{"content_type":"application/octet-stream","revpos":124,"digest":"md5-uQDzmYafvd/HvTJ3mUyLgw==","length":12984,"stub":true},"optimist-0.4.0.tgz":{"content_type":"application/octet-stream","revpos":121,"digest":"md5-Qka6k4uV5oWTww24Qt5P1Q==","length":12765,"stub":true},"optimist-0.3.7.tgz":{"content_type":"application/octet-stream","revpos":118,"digest":"md5-p4myQcSLDtU5PdiW3z137w==","length":12549,"stub":true},"optimist-0.3.6.tgz":{"content_type":"application/octet-stream","revpos":116,"digest":"md5-DueY6+6h+OTzM7P4iu5l9Q==","length":12598,"stub":true},"optimist-0.3.5.tgz":{"content_type":"application/octet-stream","revpos":101,"digest":"md5-5oFLAuVTvnhrV97GjqYmCA==","length":12463,"stub":true},"optimist-0.3.4.tgz":{"content_type":"application/octet-stream","revpos":88,"digest":"md5-kYOcoyFYV6OViKIqfMCxTA==","length":12538,"stub":true},"optimist-0.3.3.tgz":{"content_type":"application/octet-stream","revpos":83,"digest":"md5-Eq2+Ja5uGwC3gWW6Z0Z1gA==","length":12495,"stub":true},"optimist-0.3.1.tgz":{"content_type":"application/octet-stream","revpos":79,"digest":"md5-eFa9A+zxtlqYkE1zVnuUmA==","length":11800,"stub":true},"optimist-0.3.0.tgz":{"content_type":"application/octet-stream","revpos":75,"digest":"md5-ixo6YIBhoVFxqPN+KKyeuw==","length":11788,"stub":true},"optimist-0.2.8.tgz":{"content_type":"application/octet-stream","revpos":70,"digest":"md5-4LAF42qgFkJWg+BctkReNg==","length":11471,"stub":true},"optimist-0.2.7.tgz":{"content_type":"application/octet-stream","revpos":68,"digest":"md5-9GdCLdqH8jznVkbyjf/H8Q==","length":11337,"stub":true},"optimist-0.2.6.tgz":{"content_type":"application/octet-stream","revpos":64,"digest":"md5-t0BAQ1OFo1Sib+eStMAJxQ==","length":11308,"stub":true},"optimist-0.2.5.tgz":{"content_type":"application/octet-stream","revpos":62,"digest":"md5-QJVI872hENNvWGP+Ry+tLg==","length":11304,"stub":true},"optimist-0.2.4.tgz":{"content_type":"application/octet-stream","revpos":60,"digest":"md5-V4yDhXE3ifUaQzmOsLTgEg==","length":11161,"stub":true},"optimist-0.2.3.tgz":{"content_type":"application/octet-stream","revpos":58,"digest":"md5-NRVX0hVlcRjZdC92K6YIIw==","length":9713,"stub":true},"optimist-0.2.2.tgz":{"content_type":"application/octet-stream","revpos":56,"digest":"md5-fKrLoZrWtXw+5ITaXcXgBw==","length":9595,"stub":true},"optimist-0.2.1.tgz":{"content_type":"application/octet-stream","revpos":54,"digest":"md5-FpyRtmufNwNV17Lj3bE0VA==","length":9446,"stub":true},"optimist-0.2.0.tgz":{"content_type":"application/octet-stream","revpos":52,"digest":"md5-y8zpVGItFFYgNe3iNal2Jw==","length":8982,"stub":true},"optimist-0.0.3.tgz":{"content_type":"application/octet-stream","revpos":48,"digest":"md5-Gu0oCNCbD1Uki/2RcH2dEA==","length":3895,"stub":true},"optimist-0.1.9.tgz":{"content_type":"application/octet-stream","revpos":42,"digest":"md5-pEYFZ2Ayic4OVE+XnBgiFA==","length":7870,"stub":true},"optimist-0.1.8.tgz":{"content_type":"application/octet-stream","revpos":40,"digest":"md5-KSQ/QYT218dKyFforjobWw==","length":7740,"stub":true},"optimist-0.1.7.tgz":{"content_type":"application/octet-stream","revpos":38,"digest":"md5-kuMOFCqPA+3fZe5wAoJkvQ==","length":7650,"stub":true},"optimist-0.1.6.tgz":{"content_type":"application/octet-stream","revpos":36,"digest":"md5-VQGuFlwNqfW9dluVGAPung==","length":7547,"stub":true},"optimist-0.1.5.tgz":{"content_type":"application/octet-stream","revpos":34,"digest":"md5-s/q19VNxIBEt8kJMKIgLgQ==","length":7054,"stub":true},"optimist-0.1.4.tgz":{"content_type":"application/octet-stream","revpos":28,"digest":"md5-qo9j4yQZZ2bVphRNdykI/Q==","length":6431,"stub":true},"optimist-0.1.3.tgz":{"content_type":"application/octet-stream","revpos":26,"digest":"md5-gjKi5e08v+EsS4pgDok9cg==","length":6612,"stub":true},"optimist-0.1.2.tgz":{"content_type":"application/octet-stream","revpos":24,"digest":"md5-scvhz0+WQU6CQ9GOr4upWw==","length":6575,"stub":true},"optimist-0.1.1.tgz":{"content_type":"application/octet-stream","revpos":22,"digest":"md5-eRK/UJ1K8f2KzTRdzoS/Qw==","length":6179,"stub":true},"optimist-0.1.0.tgz":{"content_type":"application/octet-stream","revpos":20,"digest":"md5-pa99w4YezJSc5rwUaM8dvQ==","length":5809,"stub":true},"optimist-0.0.7.tgz":{"content_type":"application/octet-stream","revpos":18,"digest":"md5-pRDoQx+Kl+XL9l/O1NRV2A==","length":5470,"stub":true},"optimist-0.0.6.tgz":{"content_type":"application/octet-stream","revpos":13,"digest":"md5-prbC00jgIbKx0pRJk3H3Yw==","length":5470,"stub":true},"optimist-0.0.5.tgz":{"content_type":"application/octet-stream","revpos":11,"digest":"md5-zMnStZ7TmRET2xBnt2V4Qg==","length":5342,"stub":true},"optimist-0.0.4.tgz":{"content_type":"application/octet-stream","revpos":9,"digest":"md5-y7Y+/2R3qu0qa+5I0mJDRA==","length":5092,"stub":true},"optimist-0.0.2.tgz":{"content_type":"application/octet-stream","revpos":5,"digest":"md5-qhp0ch0rzo1O4GTFO0AOtg==","length":3128,"stub":true},"optimist-0.0.1.tgz":{"content_type":"application/octet-stream","revpos":3,"digest":"md5-cL87g7wfaP2HMV5LK9Gh+A==","length":3130,"stub":true}}}