{"_id":"to-flags","_rev":"44792","name":"to-flags","description":"Convert the properties of an object to command line flags.","dist-tags":{"latest":"0.2.0"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:13:48.000Z","created":"2015-06-13T10:20:34.589Z","0.2.0":"2015-08-07T21:31:08.455Z","0.1.0":"2015-06-13T10:20:34.589Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/to-flags.git"},"versions":{"0.2.0":{"name":"to-flags","description":"Convert the properties of an object to command line flags.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/to-flags","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/to-flags.git"},"bugs":{"url":"https://github.com/jonschlinkert/to-flags/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"mocha":"*","should":"*"},"dependencies":{"to-flag":"^1.0.0"},"keywords":["arg","args","arguments","argv","bin","cli","cmd","command","command-line","dargs","expand","flag","flags","line","minimist","nopt","opt","options","opts","to","to-args","yargs"],"verb":{"related":{"list":["to-flag","minimist-plugins","minimist-events","minimist-methods","minimist-expand"]}},"gitHead":"d3c592f9bb572161bc9bb89c9231ec75854ccf0a","_id":"to-flags@0.2.0","_shasum":"ec15c28a2e6022e7257c659677ad4d12485ff4be","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"ec15c28a2e6022e7257c659677ad4d12485ff4be","size":2178,"noattachment":false,"key":"/to-flags/-/to-flags-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-flags/download/to-flags-0.2.0.tgz"},"directories":{},"publish_time":1438983068455,"_cnpm_publish_time":1438983068455,"_hasShrinkwrap":false},"0.1.0":{"name":"to-flags","description":"Convert the properties of an object to command line flags.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/to-flags","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/to-flags.git"},"bugs":{"url":"https://github.com/jonschlinkert/to-flags/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"to-arg":"^1.1.0"},"devDependencies":{"mocha":"*","should":"*"},"keywords":[],"_id":"to-flags@0.1.0","_shasum":"db754fa637bb7fedd4dd9465790d0d561906d599","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"db754fa637bb7fedd4dd9465790d0d561906d599","size":2034,"noattachment":false,"key":"/to-flags/-/to-flags-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-flags/download/to-flags-0.1.0.tgz"},"directories":{},"publish_time":1434190834589,"_cnpm_publish_time":1434190834589,"_hasShrinkwrap":false}},"readme":"# to-flags [![NPM version](https://badge.fury.io/js/to-flags.svg)](http://badge.fury.io/js/to-flags)\n\n> Convert the properties of an object to command line flags.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/)\n\n```sh\n$ npm i to-flags --save\n```\n\n## Usage\n\n```js\nvar toFlags = require('to-flags');\n```\n\n## API\n\n**Params**\n\n* `obj` **{Object}**\n* `keys` **{Array}**\n* `returns` **{Array}**: Array of args\n\n**Example**\n\n```js\nvar options = {\n  foo: 'bar',\n  abc: true,\n  xyz: 10,\n  one: false\n};\n\n// create command line args for all options\ntoFlags(options);\n//=> ['--foo=bar', '--abc', '--xyz=10', '--no-one']\n\n// or specific options\ntoFlags(options, ['foo', 'abc']);\n//=> ['--foo=bar', '--abc']\n```\n\n## Related projects\n\n* [minimist-plugins](https://github.com/jonschlinkert/minimist-plugins): Simple wrapper to make minimist pluggable. ~20 sloc.\n* [minimist-events](https://github.com/jonschlinkert/minimist-events): Add events to minimist, ~30 sloc.\n* [minimist-methods](https://github.com/jonschlinkert/minimist-methods): Map your node.js application's methods to command line arguments.\n* [minimist-expand](https://github.com/jonschlinkert/minimist-expand): Expand minimist args with expand-object.\n* [to-flag](https://github.com/jonschlinkert/to-flag): Create a command-line argument from a string or string (key) and value.\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm i -d && npm test\n```\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/to-flags/issues/new)\n\n## Author\n\n**Jon Schlinkert**\n\n+ [github/jonschlinkert](https://github.com/jonschlinkert)\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2015 Jon Schlinkert\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 07, 2015._","_attachments":{},"homepage":"https://github.com/jonschlinkert/to-flags","bugs":{"url":"https://github.com/jonschlinkert/to-flags/issues"},"license":"MIT"}