{"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.0","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":"37a8648b19b88c0605aba086f2a9221eecac03db","_id":"string-argv@0.1.0","_npmVersion":"6.2.0","_nodeVersion":"10.5.0","_npmUser":{"name":"cellule","email":"mike.ferris@hotmail.com"},"dist":{"integrity":"sha512-wDKYrFaNrwOTqavWFn2EKfWk8+zCAOzVJxFVbYW+WNSTjPEO2+rd90Z5Fois6EuoWY+L9ZQhno5nig3Q25GRHg==","shasum":"4f528f49e2ed0e0ca05fff8bc07246b19c281e28","tarball":"http://registry-npm.ywwl.com/string-argv/download/string-argv-0.1.0.tgz","fileCount":4,"unpackedSize":4774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYKDvCRA9TVsSAnZWagAA+pkP+wXcE7dzRXHM16Wx/mY6\nhz3rAaPrN8JpiOwP8IQ9xMcABsnfANKVE4ujnt9w2n6g60sXJkHhj644o3n/\nzNdO5g9ycY1AFzJdlT1QpAzeNoJRgWK2m+ZEv/f2JAJehc5yF01cAetDubXj\nNLuO7hAtMUOWxgxKvXh2gUlYliuSBkYBL9fgoaFDamcEJ3EzFRnvIQnsz8FY\nFgZrm65XIbNU9WYGU12cnoR3lvYgCU0saNzwf7+lU2g5RtOb1BbYAsAo1iB5\ntM+y2xD8aKaQApDAtJ33GKQbiUYSbxfiR3r8bd923ujzvPrrAFmrMANKLqg7\nMHyn/q8dqp+bW45fzU1fSgeRQxmX7O+w98F1RbbVs+Uk9HQawAqHi2pTo1AV\n8f7n7qk9xdrUBK8ZpTgEHLDFZBIvOr3ZUI05nULmEtSwVxrV2CLnnjIvz4Cv\nNUcpWeXkKWzW+rZ+RozKEEvsxaUFUldII5VtMfqKdW2UaXibUNtLbmQ/SI4x\nF34GB1LMQMY0xtDgLnzoHc/QQoDa3THtnu8gcPQLCHCS0uOtFKfVqKqa98hR\nlv1C7qj8oCg5z6DWTmO9UNWRyJF+Sz832DyoEHUxXxfBj2U8tZLweilPbNTI\nLMQwJXaDm4hsPXwBzh3sBjPTW18ITX92EkhWKP9lEtukRRlnKaMb3AFkW2JT\nhRMg\r\n=MUmR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF5HTPnxQGpEZYOlk3YCtH6ta5jUL9RlV3/1bR7VMHUEAiEA0Xczwg8TTz3hfR0bNe38tFcUf7W/RMlAHQt6MQekGSk="}],"size":2274,"noattachment":false,"key":"/string-argv/-/string-argv-0.1.0.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.1.0_1533059311311_0.27069446754384674"},"_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":1533059311406,"_cnpm_publish_time":1533059311406,"dist-tags":{"latest":"0.4.0"}}