{"_id":"noptify","_rev":"291612","name":"noptify","description":"nopt wrapper with commander-like API","dist-tags":{"latest":"0.0.3"},"maintainers":[{"name":"mklabs","email":"daniel.mickael@gmail.com"}],"time":{"modified":"2021-06-03T18:51:41.000Z","created":"2013-01-05T19:21:52.245Z","0.0.3":"2013-01-13T23:22:15.295Z","0.0.2":"2013-01-09T21:06:24.099Z","0.0.1":"2013-01-05T19:21:52.245Z"},"users":{"tunnckocore":true,"itonyyo":true},"author":{"name":"mklabs"},"repository":{"type":"git","url":"git://github.com/mklabs/noptify.git"},"versions":{"0.0.3":{"author":{"name":"mklabs"},"name":"noptify","description":"nopt wrapper with commander-like API","version":"0.0.3","repository":{"type":"git","url":"git://github.com/mklabs/noptify.git"},"dependencies":{"nopt":"~2.0.0"},"devDependencies":{"mocha":"~1.8.1"},"scripts":{"test":"mocha --reporter spec"},"readmeFilename":"readme.md","_id":"noptify@0.0.3","dist":{"shasum":"58f654a73d9753df0c51d9686dc92104a67f4bbb","size":5911,"noattachment":false,"key":"/noptify/-/noptify-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/noptify/download/noptify-0.0.3.tgz"},"_npmVersion":"1.2.0","_npmUser":{"name":"mklabs","email":"daniel.mickael@gmail.com"},"maintainers":[{"name":"mklabs","email":"daniel.mickael@gmail.com"}],"directories":{},"publish_time":1358119335295,"_hasShrinkwrap":false,"_cnpm_publish_time":1358119335295},"0.0.2":{"author":{"name":"mklabs"},"name":"noptify","description":"nopt wrapper with commander-like API","version":"0.0.2","repository":{"type":"git","url":"git://github.com/mklabs/noptify.git"},"dependencies":{"nopt":"~2.0.0"},"devDependencies":{"mocha":"~1.8.1"},"scripts":{"test":"mocha --reporter spec"},"_npmUser":{"name":"mklabs","email":"daniel.mickael@gmail.com"},"_id":"noptify@0.0.2","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"41a747eca667669db0a39204bf67431d6a1f98ca","size":5783,"noattachment":false,"key":"/noptify/-/noptify-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/noptify/download/noptify-0.0.2.tgz"},"maintainers":[{"name":"mklabs","email":"daniel.mickael@gmail.com"}],"directories":{},"publish_time":1357765584099,"_hasShrinkwrap":false,"_cnpm_publish_time":1357765584099},"0.0.1":{"author":{"name":"mklabs"},"name":"noptify","description":"nopt wrapper with commander-like API","version":"0.0.1","repository":{"type":"git","url":"git://github.com/mklabs/noptify.git"},"dependencies":{"nopt":"~2.0.0"},"_npmUser":{"name":"mklabs","email":"daniel.mickael@gmail.com"},"_id":"noptify@0.0.1","devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"6fb12c7ee03b45d4bc2ce0eb14d55ee5d9df56e5","size":2028,"noattachment":false,"key":"/noptify/-/noptify-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/noptify/download/noptify-0.0.1.tgz"},"maintainers":[{"name":"mklabs","email":"daniel.mickael@gmail.com"}],"directories":{},"publish_time":1357413712245,"_hasShrinkwrap":false,"_cnpm_publish_time":1357413712245}},"readme":"### noptify\n\nnoptify is a little wrapper around `nopt` module adding a more expressive,\ncommander-like, API and few helpers.\n\nExamples\n\n     var program = noptify(process.argv, { program: 'name' })\n       .version('0.0.1')\n       .option('port', '-p', 'Port to listen on (default: 35729)', Number)\n       .option('pid', 'Path to the generated PID file', String)\n\n     var opts = program.parse();\n\nReturns an instance of `Noptify`\n\n### Noptify\n\nNoptify provides the API to parse out option, shorthands and generate the\nproper generic help output.\n\n- args     - The Array of arguments to parse (default: `process.argv`);\n- options  - An hash of options with the following properties\n  - program - The program name to use in usage output\n\nEvery noptify instance is created with two options, `-h, --help` and `-v,\n--version`.\n\n### Noptify#parse\n\nParse the provided options and shorthands, pass them through `nopt` and\nreturn the result.\n\nWhen `opts.help` is set, the help output is displayed and `help`\nevent is emitted. The process exists with `0` status, the help output is\nautomatically displayed and the `help` event is emitted.\n\nExamples\n\n    var program = noptify(['foo', '--help'])\n      .on('help', function() {\n        console.log('Examples');\n        console.log('');\n        console.log('  foo bar --baz > foo.txt');\n      });\n\n    var opts = program.parse();\n    // ... Help output ...\n    // ... Custom help output ...\n    // ... Exit ...\n\n\n\n### Noptify#version\n\nDefine the program version.\n\n### Noptify#option\n\nDefine `name` option with optional shorthands, optional description and optional type.\n\n### Noptify#help\n\nSimply output to stdout the Usage and Help output.\n\n","_attachments":{},"readmeFilename":"readme.md"}