{"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.3.0","contributors":[{"name":"Michael Ferris","email":"mike.ferri@hotmail.com"}],"author":{"name":"Anthony McCormick","email":"anthony.mccormick@gmail.com"},"license":"MIT","keywords":["argv"],"scripts":{"build":"tsc -p .","prepublishOnly":"npm test","test":"npm run build & jasmine --config=test/config.json"},"main":"index","types":"index.d.ts","engines":{"node":">=0.6.19"},"bugs":{"url":"https://github.com/mccormicka/string-argv/issues"},"repository":{"type":"git","url":"git+https://github.com/mccormicka/string-argv.git"},"homepage":"https://github.com/mccormicka/string-argv","dependencies":{},"devDependencies":{"jasmine":"^2.4.1","typescript":"^3.4.3"},"gitHead":"7415c20121bfa02887162b8326042563b903c332","_id":"string-argv@0.3.0","_nodeVersion":"8.11.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-NGZHq3nkSXVtGZXTBjFru3MNfoZyIzN25T7BmvdgnSC0LCJczAGLLMQLyjywSIaAoqSemgLzBRHOsnrHbt60+Q==","shasum":"0ea99e7257fea5e97a1bfcdfc19cf12d68e6ec6a","tarball":"http://registry-npm.ywwl.com/string-argv/download/string-argv-0.3.0.tgz","fileCount":6,"unpackedSize":6034,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctd+cCRA9TVsSAnZWagAAqsIP/3q1AvxFbTn4yGCHeFo6\n8MkjDlJVdwH0+edRGKZX8E0YEbk+yPsLGDqgW55vmjzPRfR90rv0d5RYOP+O\nSiaXiykEhYHXYlQi2VgGzoYfnf+a6b3UtspRaOrmcNjNO7SrybWPEoSwMFd+\n7Mg0E8Q/7hujt6UJgrxvuWHDn9x0qejGufovrdHUCfKJgzMgUTnn9LS+wNVS\nqFGpQKIxcvQKJcK00oxmWkO9S84xG9P7sxJ86Edt/s2RkL96vs36dilrY6N+\nRGb0/mHiWi4OW67AOscRycRTmyn3lot40Ufc8KK9MaVcy/GKJhUy/e9Crqyu\nhS4zjD6K1HOBh4qJ9aI0/GtZNcz6GqJmmDP8g/I+UPRhJgIhYm49Z9ORgbo1\nGpVP/xNgMpTeezPO7iXJIrTZs2npaTK/WlkEANvVzxXMa8vz48rvbb0K5h+4\nqd1MO4DBvSBoaSDPVND9DWZDXOnDEagJ0LGCJrmBSJc+Fyvbsm6jnXj/FSeP\nZoTKY1d7wFBRLoZHuzRltc8ZX9ouy1l4uSzftxwNO/KtO7bdxvPhd5YV7O0Q\nkWuabJO51HeaEB1KyMlDh3CkQQN5s4BAqy+2R7aUkWS4VHLMdFD6oSz5zRkL\n1/ngY1oATstgspo81b3hJ/o7nGFJ7GW/zVyFMgxhxkN1sjrYaGpg3Zt1LhFF\n9W8v\r\n=ekV8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAxhyUtk/5kGq12BIXSte7VgYbvN/hhOqU58xDTVKKuAIhAIrVIL9tWiX9e9AM5PaJbxGlVmxQKKE1OaK/ATA1tDUM"}],"size":2834,"noattachment":false,"key":"/string-argv/-/string-argv-0.3.0.tgz"},"maintainers":[{"name":"cellule","email":"mike.ferris@hotmail.com"},{"name":"mccormicka","email":"anthony.mccormick@gmail.com"}],"_npmUser":{"name":"cellule","email":"mike.ferris@hotmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/string-argv_0.3.0_1555423131981_0.1878631082071014"},"_hasShrinkwrap":false,"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":1555423132072,"_cnpm_publish_time":1555423132072,"dist-tags":{"latest":"0.4.0"}}