{"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.1.2","contributors":[{"name":"Michael Ferris","email":"mike.ferri@hotmail.com"}],"author":{"name":"Anthony McCormick","email":"anthony.mccormick@gmail.com"},"license":"MIT","keywords":["argv"],"scripts":{"lint":"eslint .","test":"jasmine --config=test/config.json && npm run lint"},"main":"index","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":{"eslint":"^2.0.0","eslint-config-cellule":"^3.0.0","jasmine":"^2.4.1"},"gitHead":"9ca69c292deebad6628c2eccf180c12dc5015fd4","_id":"string-argv@0.1.2","_nodeVersion":"10.5.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-mBqPGEOMNJKXRo7z0keX0wlAhbBAjilUdPW13nN0PecVryZxdHIeM7TqbsSUA7VYuS00HGC6mojP7DlQzfa9ZA==","shasum":"c5b7bc03fb2b11983ba3a72333dd0559e77e4738","tarball":"http://registry-npm.ywwl.com/string-argv/download/string-argv-0.1.2.tgz","fileCount":4,"unpackedSize":5065,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchpmmCRA9TVsSAnZWagAAhYIP+wWa+ADTS3lQ8i2llgmd\nhQcJmSIQK/ijWc/eLH+I50Rgft/CZv+abJHfrPhOuztHBElh+M2xTjRoYAjk\n503Cs2SsSuYZu1BPCAL6HjtzjfWPzem4AZYV5Iqj39H94NWRvae1gtviZqi5\nnFhvjQrQVI7gbCqO+rJaHmFqlf0KOs/T4Xg9mmi26dX4u94H5lvsxxbH1fTN\nONkaqJ4ZAogTGrwH4lDdB+Ykpp+g4AUansQxyWskbfudnakkq+FN/THm9AaR\nIE//lRSOpN5l6l5DGgP8NBRdwcQ/U+To4KeAn4uY87ugVN12p0N56XlcBr1d\nLsgxmnj6zbPPa2+IODUGsQjNvsEgmTbdqQrpX6tzbfH1V/ILZLectlMJSPNO\nyYwBzTQ4e81+F9kjcdOM21rZKspw9H/RQvac7LN/jQSnSZKY589ZdAD4UIBg\n1KeSxROHlG6P2dwGKqNFIQUtYnUsTDvUHTrHj7KLhyA4JhOG/a/N+8n61mos\n89QMskNbhOzn41Cp34UXcf/9WyJnMx0Xe4BUvagSRVnpwZVNO4M4b9YH1Ssr\nLuwnbaNI0OZex1lrWRSgcjcBwqB1gY/GCBGrunJ2D79cy9Gc+tOA9dbp4DKO\nFYU7t7IF/lQEFGe7YjVhxn6QLaKckLgIB9nRIHxOOPUSi7oPIxA+uixEUZB4\nUUjg\r\n=F4+T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEMDVkFzYDE7GufgMca5EWJYaGEgSnY261hLu5Lhxtj0AiEAwzQJhak9GAIoRg2ZiUS/eWmaOAKIpMsnIAql7fxOqqU="}],"size":2397,"noattachment":false,"key":"/string-argv/-/string-argv-0.1.2.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.1.2_1552325030192_0.32058318983146616"},"_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":1552325030322,"_cnpm_publish_time":1552325030322,"dist-tags":{"latest":"0.4.0"}}