{"name":"argsparser","description":"A tiny command line arguments parser","version":"0.0.3","author":{"name":"Oleg Slobodskoi","email":"oleg008@gmail.com"},"repository":{"type":"git","url":"http://github.com/kof/node-argsparser.git"},"keywords":["arguments","options","command line","parser"],"directories":{"lib":"./lib"},"main":"./lib/argsparser","engines":{"node":">= 0.2.0"},"scripts":{"install":"node ./test/test.js"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.php"}],"_id":"argsparser@0.0.3","_engineSupported":true,"_npmVersion":"0.2.13-2","_nodeVersion":"v0.3.2","dist":{"shasum":"c6782e62e97ce60c6e5245c1115da6d732410539","tarball":"http://registry-npm.ywwl.com/argsparser/download/argsparser-0.0.3.tgz","integrity":"sha512-lRDJ+KlL4e3fc6eGEkNXcNqNKS9jWhH8ImrViQ4kXbRpqNQTfUWZtH8oWL1vJnAL2uGIO3ITMJGYCFMB/rwm+w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJz4H9V+YfkvqpglddXjZ6BCuz7iFv4suHeAMHbqdZTwIhALXoJwgG6DxOT5JJaA2Q/mnJC1UwOn2gWAGxy7XNtor1"}],"size":2733,"noattachment":false,"key":"/argsparser/-/argsparser-0.0.3.tgz"},"readme":"## Yet another tiny arguments parser for node\n\n## Features\n * extremely tiny\n * instead to parse all possible spellings, it uses just some simple rules\n\n## How this parser works\nThe target is to get a key-value object from an array. A key can be the first element or element prefixed by \"-\" and \"--\" (switch). \nSo the parser loops through the array and looks for keys. After he could detect an a key all next elements will be added as a value of this key until he find another key.\nIf there is no value, then the key is true (boolean). If there are a lot of values, then the key is an array.\n\n## Examples\n\nnode script.js -> {\"node\": \"script.js\"}\n\nnode script.js -o -> {\"node\": \"script.js\", \"-o\": true}\n\nnode script.js -o test -> {\"node\": \"script.js\", \"-o\": \"test\"}\n\nnode script.js -a testa --b testb -> {node: \"script.js\", \"-a\": \"testa\", \"--b\": \"testb\"}\n \nnode script.js -paths /test.js /test1.js -> {node: \"script.js\", \"-paths\": [\"/test.js\", \"/test1.js\"]}\n\n## Usage\n\n    // per default it parses process.argv\n    var args = require( \"argsparser\" ).parse(); // {\"node\": \"/path/to/your/script.js\"}\n    \n    // optional you can pass your own arguments array\n    var args = require( \"argsparser\" ).parse([\"-a\", \"test\"]); // {\"-a\": \"test\"}\n\n    \n## Installation\n    npm install argsparser    ","publish_time":1293709505073,"maintainers":[{"name":"kof","email":"oleg008@gmail.com"}],"_cnpm_publish_time":1293709505073,"dist-tags":{"latest":"0.0.7","stable":"0.0.6"}}