{"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.2.1","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":"26d956a83e3bdb8ca526f712339521ddd2534e01","_id":"string-argv@0.2.1","_nodeVersion":"8.11.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-D4+jujT+SYT8xMcUHS6dfUV+fDT4C9EH0V+K8j+3AI06RQIkGhlqh7Gu8z5Oerv6yrmRwKXxGBdzipkGbHMpCw==","shasum":"9edddd5119404a2badb9af0a9e50ef8caf4d29e5","tarball":"http://registry-npm.ywwl.com/string-argv/download/string-argv-0.2.1.tgz","fileCount":5,"unpackedSize":5380,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctdXkCRA9TVsSAnZWagAAQxEP/RmJ9Gla8HpZJgtR+qMp\n/5jDFXMDzt/SChaaRT0ipHB/ULcS+yh7MEyVrCyGFF11x4BSx9gZ3IVgm/qM\nA2/i8q29Z1FGk6Re3Rlcc/32W3kzIrk+nTUNgmeVPiuQZbzRqccejA+8uRZQ\nySKb5b5lvy+HWFsbBiMZlHnNdtFtgAnbPysDnBKGvRA+PgbHo6rTJcbc3zM9\nzFQ7LQb1jXBUdH8HSMoaeqxERswbaRvoiaOPq1aT6ObkpmRAW4/8t2njVoIr\n0sQsJ4hK81TTEPYKugky5mh8Hev/OZmGZfX4HdPl4nqt80OsgkTxYr0H/nrw\npikIdcB3+CQmN36UO2y1Q4hytt2JQAAk6sm6P/KUtR6PDapwoeoMMQ16X2gy\nkMsHUDb/LApXasvKF0XOH4VQwr/oUlC7jiXe5nTGP9fyRnaR/tT90OqGDr1U\nVxGT4Qx5AfoDE8hOVCHmJjnEVzAOv2nIcke/TagY2dpy65JcmEMV4Xvbg/Pm\na1lbxKPazILeYm6byuzwjZVl0OnR12qs8xbhBTZuITtBOiXmDrmU9dUpt9qo\n8rfPQhIomAgze8/+SwiJsctD5ONh+drteZh/dzDwMlMrBLip5LRWIvnrnPSr\nRh4qR/RHBUQ5jGZTZwkHoUeEFAbEyI2j4i11Ea5EvCjapFPOHAuB/+ASQKIJ\ntOVK\r\n=kxTi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCD2HUZ2Yv17K5YbDLZdrVAYCeG+clQe8BlOvVwfHQrYAIhAKjVlF4yGBAm8qcAtj2ajPcH8OFncpyMjqyek9BEpnZG"}],"size":2605,"noattachment":false,"key":"/string-argv/-/string-argv-0.2.1.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.2.1_1555420643538_0.993037657325833"},"_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":1555420643675,"_cnpm_publish_time":1555420643675,"dist-tags":{"latest":"0.4.0"}}