{"_id":"getargs","_rev":"21-29e83b015dcce2ef27b3cf02254b50b6","name":"getargs","description":"Utility to handle optional arguments and argument type checking.","dist-tags":{"latest":"0.0.8"},"versions":{"0.0.0":{"name":"getargs","version":"0.0.0","description":"Utility to handle optional arguments and argument type checking.","main":"index.js","dependencies":{"is-type":"~0.0.1"},"devDependencies":{"chai":"~1.7.2"},"scripts":{"test":"mocha tests.js -u tdd"},"keywords":["arguments","utility"],"author":{"name":"Toby Ho"},"license":"MIT","readme":"ERROR: No README data found!","_id":"getargs@0.0.0","dist":{"shasum":"6c3b9dd205bb5ef2ce06a9cef5ffca9a8d64fbe9","tarball":"https://registry.npmjs.org/getargs/-/getargs-0.0.0.tgz","integrity":"sha512-acaIQGUo+NpdTriFjKf9Ta74UF3KpD9sJLQpLEQnhvFbiOOaaCkYPh2JyJCvWovHMfJ+4feko4jspCiCiX69vg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAhBnsRrGPVqj9boi0FiBHEKdIH92DQz2iNBhTeEpsDIAiAr+BxEla3/EkGtFU9Cw+hNO+SlVErazJZOmcd3bDG+PQ=="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"airportyh","email":"airportyh@gmail.com"},"maintainers":[{"name":"airportyh","email":"airportyh@gmail.com"}]},"0.0.1":{"name":"getargs","version":"0.0.1","description":"Utility to handle optional arguments and argument type checking.","main":"index.js","dependencies":{"is-type":"~0.0.1"},"devDependencies":{"chai":"~1.7.2"},"scripts":{"test":"mocha tests.js -u tdd"},"keywords":["arguments","utility"],"repository":{"type":"git","url":"git@github.com:airportyh/getargs.git"},"author":{"name":"Toby Ho"},"license":"MIT","bugs":{"url":"https://github.com/airportyh/getargs/issues"},"readme":"ERROR: No README data found!","_id":"getargs@0.0.1","dist":{"shasum":"702786876629331ed8e6db1e962148732cc15dcc","tarball":"https://registry.npmjs.org/getargs/-/getargs-0.0.1.tgz","integrity":"sha512-QziCcUU36smNupUKTwKaDzv9NMMNC4RoXTSDYwmS3rZv8Ut1D3fkC1+kubZqqbOTXQx9xFUPr4bFldczg2hOcw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCc2md+PU3ymD43zbIKhAkn+jU3XlO4KNwSj5Ys+IlQywIgJPy+tKoSsz5Dsv13Ur9fx7QDqooiMMBT2XQigPgeprc="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"airportyh","email":"airportyh@gmail.com"},"maintainers":[{"name":"airportyh","email":"airportyh@gmail.com"}]},"0.0.2":{"name":"getargs","version":"0.0.2","description":"Utility to handle optional arguments and argument type checking.","main":"index.js","dependencies":{"is-type":"~0.0.1"},"devDependencies":{"chai":"~1.7.2"},"scripts":{"test":"mocha tests.js -u tdd"},"keywords":["arguments","utility"],"repository":{"type":"git","url":"git@github.com:airportyh/getargs.git"},"author":{"name":"Toby Ho"},"license":"MIT","bugs":{"url":"https://github.com/airportyh/getargs/issues"},"readme":"ERROR: No README data found!","_id":"getargs@0.0.2","dist":{"shasum":"dbea38ea2579ebdcbed4f990a6adfdf9b7ccf705","tarball":"https://registry.npmjs.org/getargs/-/getargs-0.0.2.tgz","integrity":"sha512-E83cSTvPdrgw5Dauz7UpXd5IsELfPau6HzwYs0JmcF8F5zHmrim3GU62KXYJDj+a1Tiro7hR5EaAlWpHHIENXQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIESlzf2euFkF36W/5PjYsjJ5DHFUr57IFbQF03q4x0ExAiEA1e9WYyjBEWUpAiEKObR5+0Fit3+6yN2MQtWUfxtJPhY="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"airportyh","email":"airportyh@gmail.com"},"maintainers":[{"name":"airportyh","email":"airportyh@gmail.com"}]},"0.0.3":{"name":"getargs","version":"0.0.3","description":"Utility to handle optional arguments and argument type checking.","main":"index.js","dependencies":{"is-type":"~0.0.1"},"devDependencies":{"chai":"~1.7.2"},"scripts":{"test":"mocha tests.js -u tdd"},"keywords":["arguments","utility"],"repository":{"type":"git","url":"git@github.com:airportyh/getargs.git"},"author":{"name":"Toby Ho"},"license":"MIT","bugs":{"url":"https://github.com/airportyh/getargs/issues"},"readme":"ERROR: No README data found!","_id":"getargs@0.0.3","dist":{"shasum":"13ffb121ef0ce6e1e9ef69a74d2db69e85d4a9d5","tarball":"https://registry.npmjs.org/getargs/-/getargs-0.0.3.tgz","integrity":"sha512-/48c2xHfh/nAfOBWjATEwXRPtfWkohqzbd9e+DBRJwvRegBRp8in08vxdKabVibn5FVVrHjvIE1f/zxJ4KC2fA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAN4iVJUgLhqcznbPpzNSytG0EXaJyg0XalUTHoUQCQuAiA+3jrRpSyIGNBlIQByzQBbPTVi7N/XPPFwwOTtHnZc4Q=="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"airportyh","email":"airportyh@gmail.com"},"maintainers":[{"name":"airportyh","email":"airportyh@gmail.com"}]},"0.0.4":{"name":"getargs","version":"0.0.4","description":"Utility to handle optional arguments and argument type checking.","main":"index.js","dependencies":{},"devDependencies":{"chai":"~1.7.2"},"scripts":{"test":"mocha tests.js -u tdd"},"keywords":["arguments","utility"],"repository":{"type":"git","url":"git@github.com:airportyh/getargs.git"},"author":{"name":"Toby Ho"},"license":"MIT","bugs":{"url":"https://github.com/airportyh/getargs/issues"},"readme":"ERROR: No README data found!","_id":"getargs@0.0.4","dist":{"shasum":"87da145c2c9dc0316ad336c0da7351303509640d","tarball":"https://registry.npmjs.org/getargs/-/getargs-0.0.4.tgz","integrity":"sha512-IXbLtb0pLQM678FRr22wadrvneKU8IwbEggFf43wEsP6Emv5pWr9Iqfa/+OT9xOrW84w77aX3hkSlN+QSN/5KA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCb6sYJ9lu3v9R3u4NCEOv4SBRxQyoXoT18W1pPyYfkqgIgJaYn+aqUEI0AB/MVigZ8awukUKT948fVpFr2GmJrUA0="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"airportyh","email":"airportyh@gmail.com"},"maintainers":[{"name":"airportyh","email":"airportyh@gmail.com"}]},"0.0.5":{"name":"getargs","version":"0.0.5","description":"Utility to handle optional arguments and argument type checking.","main":"index.js","dependencies":{},"devDependencies":{"chai":"~1.7.2"},"scripts":{"test":"mocha tests.js -u tdd"},"keywords":["arguments","utility"],"repository":{"type":"git","url":"git@github.com:airportyh/getargs.git"},"author":{"name":"Toby Ho"},"license":"MIT","readme":"getargs\n=======\n\nSimple utility for parsing/processing variable length argument lists for Javascript functions; also verifies argument types and argument list length.\n\n## Install\n\nBower - `bower install getargs`; NPM - `npm install getargs`.\n\n## Usage\n\n    var getArgs = require('getargs')\n\n    function ajax(/* url:string, [options]:object, callback:function */){\n      var args = getArgs('url:string, [options]:object, callback:function', arguments)\n\n      console.log('url is', args.url)\n      console.log('options is optionally', args.options)\n      console.log('callback', args.callback)\n    }\n\n## Argument Spec Syntax\n\nThe argument spec is a comma delimited string of individual specs, which look like\n\n    argname:type\n\n* `argname` is the name of the argument, and can be called anything\n* `type` is a basic Javascript type. Currently these are supported\n  * `string`\n  * `boolean`\n  * `number`\n  * `object`\n  * `function`\n  * `array`\n\n### Optional Arguments\n\nTo denote optional arguments, you'd surround it with square brackets `[]`.\n\n### Spread Operator\n\nYou can mimick ES6's spread operator\n\n    var args = getArgs('first,...rest', [1,2,3,4])\n    console.log(args.first) // 1\n    console.log(args.rest)  // [2,3,4]\n\n### Set properties on an object\n\nIf you pass an object as its third argument, it will set the arguments as properties on that object.\n\n    getArgs('a,b,c', arguments, this)\n    // Now you can access the arguments by\n    // this.a, this.b, and this.c\n    ","readmeFilename":"README.md","bugs":{"url":"https://github.com/airportyh/getargs/issues"},"_id":"getargs@0.0.5","dist":{"shasum":"2f3b14ece550e05e9b54a9d207e0221c597d6f9a","tarball":"https://registry.npmjs.org/getargs/-/getargs-0.0.5.tgz","integrity":"sha512-dqf8WRPRV4J24fhFXlhmbJeHpiRwel/+YK4ZPwrUZTMmJGWUeTpt1lAPnAuTnOeo/uWTjJ34W37uGFot++ajzQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICYkGm1UPCJHEtZ8YbQWM0YK6Nx0AaZwULh108RMsDfgAiEA91nRkVH0hg8mYd27SBW0QhSLCPdZKbwHnFP9aC2n6Go="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"airportyh","email":"airportyh@gmail.com"},"maintainers":[{"name":"airportyh","email":"airportyh@gmail.com"}]},"0.0.6":{"name":"getargs","version":"0.0.6","description":"Utility to handle optional arguments and argument type checking.","main":"index.js","dependencies":{},"devDependencies":{"chai":"~1.7.2"},"scripts":{"test":"mocha tests.js -u tdd"},"keywords":["arguments","utility"],"repository":{"type":"git","url":"git@github.com:airportyh/getargs.git"},"author":{"name":"Toby Ho"},"license":"MIT","readme":"getargs\n=======\n\nSimple utility for parsing/processing variable length argument lists for Javascript functions; also verifies argument types and argument list length.\n\n## Install\n\nBower - `bower install getargs`; NPM - `npm install getargs`.\n\n## Usage\n\n    var getArgs = require('getargs')\n\n    function ajax(/* url:string, [options]:object, callback:function */){\n      var args = getArgs('url:string, [options]:object, callback:function', arguments)\n\n      console.log('url is', args.url)\n      console.log('options is optionally', args.options)\n      console.log('callback', args.callback)\n    }\n\n## Argument Spec Syntax\n\nThe argument spec is a comma delimited string of individual specs, which look like\n\n    argname:type\n\n* `argname` is the name of the argument, and can be called anything\n* `type` is a basic Javascript type. Currently these are supported\n  * `string`\n  * `boolean`\n  * `number`\n  * `object`\n  * `function`\n  * `array`\n\n### Optional Arguments\n\nTo denote optional arguments, you'd surround it with square brackets `[]`.\n\n### Type Verification\n\ngetArgs will throw if the arguments have the wrong types\n\n    var args = getArgs('url:string', [1])\n    // Error: Expected url(pos 0) to be a string\n\n### Argument List Length Verification\n\ngetArgs will throw if there are too many or too few arguments\n\n    > getArgs('a,b', [1])\n    Error: Not enough arguments, expected 2, got 1\n    > getArgs('a,b', [1,1])\n    { a: 1, b: 1 }\n    > getArgs('a,b', [1,1,1])\n    Error: Too many arguments, expected 2, got 3\n\n### Spread Operator\n\nYou can mimick ES6's spread operator\n\n    var args = getArgs('first,...rest', [1,2,3,4])\n    console.log(args.first) // 1\n    console.log(args.rest)  // [2,3,4]\n\n### Set properties on an object\n\nIf you pass an object as its third argument, it will set the arguments as properties on that object.\n\n    getArgs('a,b,c', arguments, this)\n    // Now you can access the arguments by\n    // this.a, this.b, and this.c\n    ","readmeFilename":"README.md","bugs":{"url":"https://github.com/airportyh/getargs/issues"},"_id":"getargs@0.0.6","dist":{"shasum":"ca40b293067d9e6a6cb8d917b25afac62d0905aa","tarball":"https://registry.npmjs.org/getargs/-/getargs-0.0.6.tgz","integrity":"sha512-j2KzB8crb3tj2/AkWnFbzAo9whJc4VXJP6b/2+0QJVXXdV8XckvBqmPCG3uc7LOT45cISSJ+w0VIWblfPwtG6A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAwl6f6vfgbfVFdVgz2CwEXOW9yt2GQbeDOfW307kr5AIhALKznCI/njbHHnet2dYNeDluhC+fBzqKndRuFM8WXTqP"}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"airportyh","email":"airportyh@gmail.com"},"maintainers":[{"name":"airportyh","email":"airportyh@gmail.com"}]},"0.0.7":{"name":"getargs","version":"0.0.7","description":"Utility to handle optional arguments and argument type checking.","main":"index.js","dependencies":{},"devDependencies":{"chai":"~1.7.2"},"scripts":{"test":"mocha tests.js -u tdd"},"keywords":["arguments","utility"],"repository":{"type":"git","url":"git@github.com:airportyh/getargs.git"},"author":{"name":"Toby Ho"},"license":"MIT","readme":"getargs\n=======\n\nSimple utility for parsing/processing variable length argument lists for Javascript functions; also verifies argument types and argument list length.\n\n## Install\n\nBower - `bower install getargs`; NPM - `npm install getargs`.\n\n## Usage\n\n    var getArgs = require('getargs')\n\n    function ajax(/* url:string, [options]:object, callback:function */){\n      var args = getArgs('url:string, [options]:object, callback:function', arguments)\n\n      console.log('url is', args.url)\n      console.log('options is optionally', args.options)\n      console.log('callback', args.callback)\n    }\n\n## Argument Spec Syntax\n\nThe argument spec is a comma delimited string of individual specs, which look like\n\n    argname:type\n\n* `argname` is the name of the argument, and can be called anything\n* `type` is an optional basic Javascript type. Currently these are supported\n  * `string`\n  * `boolean`\n  * `number`\n  * `object`\n  * `function`\n  * `array`\n\n### Optional Arguments\n\nTo denote optional arguments, you'd surround `argname` with square brackets `[]`.\n\n### Type Verification\n\ngetArgs will throw if the arguments have the wrong types\n\n    var args = getArgs('url:string', [1])\n    // Error: Expected url(pos 0) to be a string\n\n### Argument List Length Verification\n\ngetArgs will throw if there are too many or too few arguments\n\n    > getArgs('a,b', [1])\n    Error: Not enough arguments, expected 2, got 1\n    > getArgs('a,b', [1,1])\n    { a: 1, b: 1 }\n    > getArgs('a,b', [1,1,1])\n    Error: Too many arguments, expected 2, got 3\n\n### Spread Operator\n\nYou can mimick ES6's spread operator\n\n    var args = getArgs('first,...rest', [1,2,3,4])\n    console.log(args.first) // 1\n    console.log(args.rest)  // [2,3,4]\n\n### Set properties on an object\n\nIf you pass an object as its third argument, it will set the arguments as properties on that object.\n\n    getArgs('a,b,c', arguments, this)\n    // Now you can access the arguments by\n    // this.a, this.b, and this.c\n    ","readmeFilename":"README.md","bugs":{"url":"https://github.com/airportyh/getargs/issues"},"_id":"getargs@0.0.7","dist":{"shasum":"8e63e8452a71310847db1810f12a17af56a6e792","tarball":"https://registry.npmjs.org/getargs/-/getargs-0.0.7.tgz","integrity":"sha512-JBdn1uJwLdTXKLaNpJQHwwQUkKMu47nkJgIYS2wtWfJRaKImAbq83ZBhADxjiZdnT/8Hzpks6dvwlZrQwS5ZdA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICGDmm+PiQgXi/rLIkO+vz7xtLHtDRpCuWqFbRakItj5AiBDm5IwIaxHIcxclnNquOo+cIjSfDjiWpYD8ZIHAoHsKA=="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"airportyh","email":"airportyh@gmail.com"},"maintainers":[{"name":"airportyh","email":"airportyh@gmail.com"}]},"0.0.8":{"name":"getargs","version":"0.0.8","description":"Utility to handle optional arguments and argument type checking.","main":"index.js","dependencies":{},"devDependencies":{"chai":"~1.7.2"},"scripts":{"test":"mocha tests.js -u tdd"},"keywords":["arguments","utility"],"repository":{"type":"git","url":"git@github.com:airportyh/getargs.git"},"author":{"name":"Toby Ho"},"license":"MIT","readme":"getargs\n=======\n\nSimple utility for parsing/processing variable length argument lists for Javascript functions; also verifies argument types and argument list length.\n\n## Install\n\nBower - `bower install getargs`; NPM - `npm install getargs`.\n\n## Usage\n\n    var getArgs = require('getargs')\n\n    function ajax(/* url:string|array, [options]:object, callback:function */){\n      var args = getArgs('url:string|array, [options]:object, callback:function', arguments)\n\n      console.log('url is', args.url)\n      console.log('options is optionally', args.options)\n      console.log('callback', args.callback)\n    }\n\n## Argument Spec Syntax\n\nThe argument spec is a comma delimited string of individual specs, which look like\n\n    argname:type\n\nYou can specify multiple types by using `|`\n\n    argname:type|type|type\n\n* `argname` is the name of the argument, and can be called anything\n* `type` is an optional basic Javascript type. Currently these are supported\n  * `string`\n  * `boolean`\n  * `number`\n  * `object`\n  * `function`\n  * `array`\n\n### Optional Arguments\n\nTo denote optional arguments, you'd surround `argname` with square brackets `[]`.\n\n### Type Verification\n\ngetArgs will throw if the arguments have the wrong types\n\n    var args = getArgs('url:string', [1])\n    // Error: Expected url(pos 0) to be a string\n\n### Argument List Length Verification\n\ngetArgs will throw if there are too many or too few arguments\n\n    > getArgs('a,b', [1])\n    Error: Not enough arguments, expected 2, got 1\n    > getArgs('a,b', [1,1])\n    { a: 1, b: 1 }\n    > getArgs('a,b', [1,1,1])\n    Error: Too many arguments, expected 2, got 3\n\n### Spread Operator\n\nYou can mimick ES6's spread operator\n\n    var args = getArgs('first,...rest', [1,2,3,4])\n    console.log(args.first) // 1\n    console.log(args.rest)  // [2,3,4]\n\n### Set properties on an object\n\nIf you pass an object as its third argument, it will set the arguments as properties on that object.\n\n    getArgs('a,b,c', arguments, this)\n    // Now you can access the arguments by\n    // this.a, this.b, and this.c\n    \n","readmeFilename":"README.md","bugs":{"url":"https://github.com/airportyh/getargs/issues"},"_id":"getargs@0.0.8","dist":{"shasum":"8516605872c980178e01ca70106fccd22521fc7c","tarball":"https://registry.npmjs.org/getargs/-/getargs-0.0.8.tgz","integrity":"sha512-CtvhI92IaUVMEwBW2aug11+shGOs/Ohh8/48hCE237/uVnaJokqXQCPwRclIzIafpk9d3Zd2Z1gIxArz8vokFA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCr7qzU4QyyqawD3SB0mjFAc8lkBQk5lEx6oUbwSN4B/AIhAPWQIAFUCC/+B79r7kjunKKLvF1+3nBjvDBn0nwOlT24"}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"airportyh","email":"airportyh@gmail.com"},"maintainers":[{"name":"airportyh","email":"airportyh@gmail.com"}]}},"readme":"ERROR: No README data found!","maintainers":[{"name":"airportyh","email":"airportyh@gmail.com"}],"time":{"modified":"2022-06-18T07:57:45.432Z","created":"2013-09-15T02:37:44.232Z","0.0.0":"2013-09-15T02:37:45.106Z","0.0.1":"2013-09-15T02:43:36.346Z","0.0.2":"2013-09-18T17:40:14.382Z","0.0.3":"2013-09-18T17:44:17.692Z","0.0.4":"2013-09-18T17:54:40.991Z","0.0.5":"2013-09-18T18:17:32.170Z","0.0.6":"2013-09-18T18:23:41.330Z","0.0.7":"2013-10-16T16:13:18.095Z","0.0.8":"2013-10-16T16:17:29.201Z"},"author":{"name":"Toby Ho"},"repository":{"type":"git","url":"git@github.com:airportyh/getargs.git"}}