{"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.1","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":"241a53c527ead5893874d9e9e79d56220ddacf39","_id":"string-argv@0.3.1","_npmVersion":"6.3.0","_nodeVersion":"10.7.0","_npmUser":{"name":"cellule","email":"mike.ferris@hotmail.com"},"dist":{"integrity":"sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==","shasum":"95e2fbec0427ae19184935f816d74aaa4c5c19da","tarball":"http://registry-npm.ywwl.com/string-argv/download/string-argv-0.3.1.tgz","fileCount":6,"unpackedSize":6123,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZ+SSCRA9TVsSAnZWagAAoKcP/1JNkPZq/YXUstk1tYs5\n8pn54Soi+YA59KhO45z/kNjFCsmrrMcrwqsqSyCrYOWWnfPmXBU7j6lmDXFq\nIBxS6tADhO544oeg4vzJ05DbuhQbDcKIHY/i8I7wTqp/ge16UscW/VXjsCcl\nR/w34zAYnoPUxjRYWf7uL2J0zp6B41N/cPnbP8pyIKk+M/ZLwRa1G1KvK+vG\nXmgsQ0JQo177LMwbhmwfWnwRhgMJswZnWlut3EDimTrxEUQ3dc4Muf5vMknu\nc4SbdoFNKlBXg512POWZVfszM35/+v2w+Hg6hbb1UXhxx7pxv6X+m0hvYRSO\nlQIQ8IRBmqdjCxyJf8azE7WkCd5oeaWgmKCHbmUaXwG7k77QIbt+hRqDmjoc\ny/gnUCkbZRzTxVNMCB04MsG7SxNdX++twSeCfn51Z3XDJKD2VnF9gqf0eosI\n4YPlNNgEltKA8jg3PHG1E8quOPMlzIJNe/gIjqPEFpS1MGjhHEW2LoEQl3RB\nXRb2Db7LutdCC3orFNGxViDrH/1kswQfNL/CyIVEMo3IgiNMqITa3rrCHQR0\nZP4e9+y0IIKJobEnGl4NBiKg5mZ74lmep5WeywP4zkFJK9u0ze7pykozm++K\niZL3/DBo2s1wfcXMmPsP0mtBmXHuHK6P65uFFZzSoNM8tAKwyA45+UbsKEOR\n/K06\r\n=A1sH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDMLoNabDfbB85mIJqDQMwhyyZP2JIY92rUkFEKlIbs7wIgLQ2K1oYIRpSwfhXl9sjjxu/mT4g6cGOAdwh59IT+Fzw="}],"size":2831,"noattachment":false,"key":"/string-argv/-/string-argv-0.3.1.tgz"},"maintainers":[{"name":"cellule","email":"mike.ferris@hotmail.com"},{"name":"mccormicka","email":"anthony.mccormick@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/string-argv_0.3.1_1567089809442_0.2655073439700497"},"_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":1567089809624,"_cnpm_publish_time":1567089809624,"dist-tags":{"latest":"0.4.0"}}