{"name":"string-argv","description":"string-argv parses a string into an argument array to mimic process.argv. This is useful when testing Command Line Utilities that you want to pass arguments to.","version":"0.0.1","author":{"name":"Anthony McCormick","email":"anthony.mccormick AT gmail.com"},"keywords":["logger"],"scripts":{"test":"./node_modules/jasmine-node/bin/jasmine-node test/ --verbose --color --captureExceptions"},"main":"index","engines":{"node":">=0.6.19"},"bugs":{"url":"https://github.com/mccormicka/string-argv/issues"},"repository":{"type":"git","url":"https://github.com/mccormicka/string-argv"},"homepage":"https://github.com/mccormicka/string-argv","dependencies":{"bunyan":"~0.22.1"},"devDependencies":{"grunt":"0.4.1","jasmine-node":"https://github.com/mccormicka/jasmine-node/archive/exclusive-tests.tar.gz","grunt-contrib-watch":"0.3.1","grunt-contrib-jshint":"0.4.3","grunt-jasmine-node":"~0.1.0"},"_id":"string-argv@0.0.1","dist":{"shasum":"9c33d59975e6ed920101a6227bba78076b690418","tarball":"http://registry-npm.ywwl.com/string-argv/download/string-argv-0.0.1.tgz","integrity":"sha512-LgZK8Oje5hHSHLLCYgXw15WItiLQLsB/jfWeTQravH5LvuD+1yDGby9JmOAuIYSThkF73FtMyvkxwsKf2PJOLg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+cWa1otAV5fuPlxnKHrjJzcxKbZn/erIStxGdYMVq6QIgROWpfICtASQF3ZnV/lWqnMYPXOsDNghQ2L2afhyPRd8="}],"size":2698,"noattachment":false,"key":"/string-argv/-/string-argv-0.0.1.tgz"},"_from":".","_npmVersion":"1.3.17","_npmUser":{"name":"mccormicka","email":"anthony.mccormick@gmail.com"},"maintainers":[{"name":"mccormicka","email":"anthony.mccormick@gmail.com"}],"directories":{},"readme":"\n# What is it?\n`string-argv` parses a string into an argument array to mimic `process.argv`.\nThis is useful when testing Command Line Utilities that you want to pass arguments to and is the opposite of what the other argv utilities do.\n\n# Installation\n\n```\nnpm install string-argv --save\n```\n\n# Usage\n\n```ts\n// Typescript\nimport stringArgv from 'string-argv';\n\nconst args = stringArgv(\n  '-testing test -valid=true --quotes \"test quotes\" \"nested \\'quotes\\'\" --key=\"some value\" --title=\"Peter\\'s Friends\"',\n  'node',\n  'testing.js'\n);\n\nconsole.log(args);\n```\n\n```js\n// Javascript\nvar { parseArgsStringToArgv } = require('string-argv');\n\nvar args = parseArgsStringToArgv(\n    '-testing test -valid=true --quotes \"test quotes\" \"nested \\'quotes\\'\" --key=\"some value\" --title=\"Peter\\'s Friends\"',\n    'node',\n    'testing.js'\n);\n\nconsole.log(args);\n/** output\n[ 'node',\n  'testing.js',\n  '-testing',\n  'test',\n  '-valid=true',\n  '--quotes',\n  'test quotes',\n  'nested \\'quotes\\'',\n  '--key=\"some value\"',\n  '--title=\"Peter\\'s Friends\"' ]\n  **/\n```\n\n## params\n\n__required__: __arguments__ String: arguments that you would normally pass to the command line.\n\n__optional__: __environment__ String: Adds to the environment position in the argv array. If ommitted then there is no need to call argv.split(2) to remove the environment/file values. However if your cli.parse method expects a valid argv value then you should include this value.\n\n__optional__: __file__ String: file that called the arguments. If omitted then there is no need to call argv.split(2) to remove the environment/file values. However if your cli.parse method expects a valid argv value then you should include this value.\n","publish_time":1391507167100,"_cnpm_publish_time":1391507167100,"dist-tags":{"latest":"0.4.0"}}