{"_id":"argv-split","_rev":"15-8334392b0e8db9084da6bb6f9e4b5f8e","name":"argv-split","dist-tags":{"latest":"3.2.1"},"versions":{"0.1.0":{"name":"argv-split","version":"0.1.0","keywords":["argv","argument-vector","split","quote","quoted-value"],"author":{"name":"Kael"},"license":"MIT","_id":"argv-split@0.1.0","maintainers":[{"name":"kael","email":"i@kael.me"}],"homepage":"https://github.com/kaelzhang/node-argv-split","bugs":{"url":"https://github.com/kaelzhang/node-argv-split/issues"},"dist":{"shasum":"69c66955291ff1e1eb0bf4e45697e7a208cf4342","tarball":"https://registry.npmjs.org/argv-split/-/argv-split-0.1.0.tgz","integrity":"sha512-vtDcire1158W0clByfJkZSr+iWCvIoWK/8/6z+2xYXT8L/+pIZN4mLRo47Q+kqv0czyKdD71zehmP5Jxb7+YxQ==","signatures":[{"sig":"MEUCIQD4UDjuplo8bCD96jgj7/eSWD2frlJjNtQBicyODmDSmAIgPZ1s7J6hsXNg2RlEr/fpAMezAon/zRnfEHARp5zSpSk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"69c66955291ff1e1eb0bf4e45697e7a208cf4342","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha --reporter spec ./test/*.js"},"_npmUser":{"name":"kael","email":"i@kael.me"},"repository":{"url":"git://github.com/kaelzhang/node-argv-split.git","type":"git"},"_npmVersion":"1.4.9","description":"Split argv(argument vector) and handle special cases, such as quoted values.","devDependencies":{"chai":"*","mocha":"*"},"directories":{}},"0.1.1":{"name":"argv-split","version":"0.1.1","keywords":["argv","argument-vector","split","quote","quoted-value"],"author":{"name":"Kael"},"license":"MIT","_id":"argv-split@0.1.1","maintainers":[{"name":"kael","email":"i@kael.me"}],"homepage":"https://github.com/kaelzhang/node-argv-split","bugs":{"url":"https://github.com/kaelzhang/node-argv-split/issues"},"dist":{"shasum":"43766e00f36f09d825733eca860fd453a559bcdf","tarball":"https://registry.npmjs.org/argv-split/-/argv-split-0.1.1.tgz","integrity":"sha512-YFac6IQXSDHOGi03RkElaZlnEoU/7g1v8jGtVhh5KKXmT6RosBMOUGl7Yp5UmTa7/3by+zmmumslHlKNCYYdQw==","signatures":[{"sig":"MEUCIQCIzbEDa5DxjPLsw1GNwjJaxI+Hjb4zPk6zMJH+Ko3M1AIgD/b/Jha38cKisz3OJ7bmwcTd2iD0vJJPYRC5x0UEBDU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"43766e00f36f09d825733eca860fd453a559bcdf","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha --reporter spec ./test/*.js"},"_npmUser":{"name":"kael","email":"i@kael.me"},"repository":{"url":"git://github.com/kaelzhang/node-argv-split.git","type":"git"},"_npmVersion":"1.4.9","description":"Split argv(argument vector) and handle special cases, such as quoted values.","devDependencies":{"chai":"*","mocha":"*"},"directories":{}},"1.0.0":{"name":"argv-split","version":"1.0.0","keywords":["argv","argument-vector","split","quote","quoted-value"],"author":{"name":"Kael"},"license":"MIT","_id":"argv-split@1.0.0","maintainers":[{"name":"kael","email":"i@kael.me"}],"homepage":"https://github.com/kaelzhang/node-argv-split#readme","bugs":{"url":"https://github.com/kaelzhang/node-argv-split/issues"},"dist":{"shasum":"37a30d2dbf902ffe85b8521bebe56decc15d28c6","tarball":"https://registry.npmjs.org/argv-split/-/argv-split-1.0.0.tgz","integrity":"sha512-Gx6jokdqEJXAKdjpWCoDONoymvLVE21HW1w+ScT2wYV7Uua01PGDwl6UPFWNAg36fGlet74D3GHfIrsI6QQWZw==","signatures":[{"sig":"MEUCIQDkrbQvmvM9SL1dADwc0kukpJ4wYGbl1W9PJIgEtiYoqwIgZLSvCCi9XE9EgBjI9UhiMfQ7lWRnk86MRhgMzuU5j3w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"37a30d2dbf902ffe85b8521bebe56decc15d28c6","engines":{"node":">=0.10.0"},"gitHead":"f64cdf4b1e9a6840fe2042859798c0eb9fc7f8b2","scripts":{"test":"mocha --reporter spec ./test/*.js"},"_npmUser":{"name":"kael","email":"i@kael.me"},"repository":{"url":"git://github.com/kaelzhang/node-argv-split.git","type":"git"},"_npmVersion":"3.3.6","description":"Split argv(argument vector) and handle special cases, such as quoted values.","_nodeVersion":"5.0.0","devDependencies":{"chai":"*","mocha":"*"},"directories":{}},"1.0.1":{"name":"argv-split","version":"1.0.1","keywords":["argv","argument-vector","split","quote","quoted-value"],"author":{"name":"Kael"},"license":"MIT","_id":"argv-split@1.0.1","maintainers":[{"name":"kael","email":"i@kael.me"}],"homepage":"https://github.com/kaelzhang/node-argv-split#readme","bugs":{"url":"https://github.com/kaelzhang/node-argv-split/issues"},"dist":{"shasum":"3a5428f82521e06efddc0c99916e7b25cf4c8211","tarball":"https://registry.npmjs.org/argv-split/-/argv-split-1.0.1.tgz","integrity":"sha512-3ilKdyV/WvNyx2f557XdbC+36CF75cLPL1LODH3fecSCPW6BJlTKo5fVp6yGdnGWGVmWRtNMbj8DqRXZeoHjfA==","signatures":[{"sig":"MEYCIQC1CbEV9IZdShFZe60it41mwR3bGm1gr5W63BN+viI6zAIhAN6JTZVWPQMXnpJeLc/2AdeZ8XRdbxlyeiYD6OV23t8/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"3a5428f82521e06efddc0c99916e7b25cf4c8211","engines":{"node":">=0.10.0"},"gitHead":"984618afc2c473324e1ef8080def4d5a61341134","scripts":{"test":"mocha --reporter spec ./test/*.js"},"_npmUser":{"name":"kael","email":"i@kael.me"},"repository":{"url":"git://github.com/kaelzhang/node-argv-split.git","type":"git"},"_npmVersion":"3.8.3","description":"Split argv(argument vector) and handle special cases, such as quoted values.","_nodeVersion":"5.10.1","devDependencies":{"chai":"*","mocha":"*"},"_npmOperationalInternal":{"tmp":"tmp/argv-split-1.0.1.tgz_1460800208814_0.0550293019041419","host":"packages-12-west.internal.npmjs.com"},"directories":{}},"2.0.0":{"name":"argv-split","version":"2.0.0","keywords":["argv","argument-vector","split","quote","quoted-value","balance"],"author":{"name":"Kael"},"license":"MIT","_id":"argv-split@2.0.0","maintainers":[{"name":"kael","email":"i@kael.me"}],"homepage":"https://github.com/kaelzhang/node-argv-split#readme","bugs":{"url":"https://github.com/kaelzhang/node-argv-split/issues"},"ava":{"babel":{"babelrc":true},"files":["test/*.js"],"require":"babel-register"},"dist":{"shasum":"042928deb9f7224ec61b003d704b4287d20f7fdc","tarball":"https://registry.npmjs.org/argv-split/-/argv-split-2.0.0.tgz","integrity":"sha512-pSlRtGDTDs9Yh0SQ3qSxT4bdKBxbBJVUfmD04KJPysMADYS4h/7y9xM4KhoOpMJ3kBUCV3Bn99Bb613cV+TVog==","signatures":[{"sig":"MEUCIBVviL539GhJ0rxE3k18oSNclrB9bq/fqwrKBB6QgPB5AiEAg1G44o+xUd/5QUdV8Ryk1zAGl/t0I7saOTQbSEnQya4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"split.js","_from":".","_shasum":"042928deb9f7224ec61b003d704b4287d20f7fdc","engines":{"node":">=0.10.0"},"gitHead":"a93172106102ae770967fbf5684318a2d1f76c0e","scripts":{"test":"npm run build && node --harmony ./node_modules/.bin/ava --verbose --timeout=10s","build":"babel index.js --out-file split.js"},"_npmUser":{"name":"kael","email":"i@kael.me"},"repository":{"url":"git://github.com/kaelzhang/node-argv-split.git","type":"git"},"_npmVersion":"4.1.2","description":"Split argv(argument vector) and handle special cases, such as quoted values.","_nodeVersion":"7.7.4","devDependencies":{"ava":"^0.18.2","babel-cli":"^6.16.0","babel-preset-es2015":"^6.16.0"},"_npmOperationalInternal":{"tmp":"tmp/argv-split-2.0.0.tgz_1490433865955_0.05556387244723737","host":"packages-18-east.internal.npmjs.com"},"directories":{}},"2.0.1":{"name":"argv-split","version":"2.0.1","keywords":["argv","argument-vector","split","quote","quoted-value","balance"],"author":{"name":"Kael"},"license":"MIT","_id":"argv-split@2.0.1","maintainers":[{"name":"kael","email":"i@kael.me"}],"homepage":"https://github.com/kaelzhang/node-argv-split#readme","bugs":{"url":"https://github.com/kaelzhang/node-argv-split/issues"},"ava":{"babel":{"babelrc":true},"files":["test/*.js"],"require":"babel-register"},"dist":{"shasum":"be264117790dbd5ccd63ec3f449a1804814ac4c5","tarball":"https://registry.npmjs.org/argv-split/-/argv-split-2.0.1.tgz","integrity":"sha512-qp4ts4VbGX40y4xPdIrmKGXL3RK9mJ1ia5lnluS5vq9vL4oVtT0nIiYJNBrccd/66N376W7CUdiQI0tj28DlHw==","signatures":[{"sig":"MEYCIQDFK40VclL7IDKkGYZu4tVvR9I2SbUqPDmjxuC0Y4EMZQIhAKr+9M5nAma/6oEfEqdUC4MAbfpoQQ2pRI/N0IeWxo0l","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"split.js","_from":".","_shasum":"be264117790dbd5ccd63ec3f449a1804814ac4c5","engines":{"node":">=0.10.0"},"gitHead":"6ada76999067bef42a1c3ab07593fedafc6fa659","scripts":{"test":"npm run build && node --harmony ./node_modules/.bin/ava --verbose --timeout=10s","build":"babel index.js --out-file split.js"},"_npmUser":{"name":"kael","email":"i@kael.me"},"repository":{"url":"git://github.com/kaelzhang/node-argv-split.git","type":"git"},"_npmVersion":"4.1.2","description":"Split argv(argument vector) and handle special cases, such as quoted values.","_nodeVersion":"7.7.4","devDependencies":{"ava":"^0.18.2","babel-cli":"^6.16.0","babel-preset-es2015":"^6.16.0"},"_npmOperationalInternal":{"tmp":"tmp/argv-split-2.0.1.tgz_1490434119684_0.7550823553465307","host":"packages-18-east.internal.npmjs.com"},"directories":{}},"3.0.0":{"name":"argv-split","version":"3.0.0","keywords":["argv","argument-vector","split","quote","quoted-value","balance"],"author":{"name":"Kael"},"license":"MIT","_id":"argv-split@3.0.0","maintainers":[{"name":"kael","email":"i@kael.me"}],"homepage":"https://github.com/kaelzhang/node-argv-split#readme","bugs":{"url":"https://github.com/kaelzhang/node-argv-split/issues"},"ava":{"files":["test/*.js"]},"dist":{"shasum":"068ac8a5c21ecd49974d151bbdedee4e75fd7fe7","tarball":"https://registry.npmjs.org/argv-split/-/argv-split-3.0.0.tgz","fileCount":4,"integrity":"sha512-9vyMM0igvCsDocptA67YoNAV6X0Q140DnK1+LlR4iQZUFEHrfjvbG6xxgHgRABi52QRzWfLq77r+qtxJFiMBSQ==","signatures":[{"sig":"MEQCIGLtCEj53lESodhoZG6toAouoYbFpWWmqBBmACnix2imAiADoQYp+GcYBKBhEAZ3KR8/27EMMg+hdljhabAn62Ucvg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8477},"engines":{"node":">=0.10.0"},"gitHead":"acfe7f64bdd31b70a3f8f7cf8e5eb3cb21380d57","scripts":{"fix":"eslint . --fix","lint":"eslint .","test":"NODE_DEBUG={{name}} nyc ava --timeout=10s --verbose","report":"nyc report --reporter=text-lcov > coverage.lcov && codecov","test:dev":"NODE_DEBUG={{name}} nyc ava --timeout=10s --verbose && npm run report:dev","report:dev":"nyc report --reporter=html && npm run report:open","// posttest":"npm run report","report:open":"open coverage/index.html"},"_npmUser":{"name":"kael","email":"i@kael.me"},"repository":{"url":"git://github.com/kaelzhang/node-argv-split.git","type":"git"},"_npmVersion":"10.8.2","description":"Split argv(argument vector) and handle special cases, such as quoted values.","directories":{},"_nodeVersion":"22.8.0","_hasShrinkwrap":false,"devDependencies":{"ava":"^6.2.0","nyc":"^15.0.1"},"_npmOperationalInternal":{"tmp":"tmp/argv-split_3.0.0_1732032854111_0.6757434993345417","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"argv-split","version":"3.1.0","keywords":["argv","argument-vector","split","quote","quoted-value","balance"],"author":{"name":"Kael"},"license":"MIT","_id":"argv-split@3.1.0","maintainers":[{"name":"kael","email":"i@kael.me"}],"homepage":"https://github.com/kaelzhang/node-argv-split#readme","bugs":{"url":"https://github.com/kaelzhang/node-argv-split/issues"},"ava":{"files":["test/*.js"]},"dist":{"shasum":"5bde5896773dcb80c37026e5cf39c843d1be1d25","tarball":"https://registry.npmjs.org/argv-split/-/argv-split-3.1.0.tgz","fileCount":4,"integrity":"sha512-jeyYmu0gP673WvgF8I58FP0UPoKkNHQZI63toy4xKrkiQJ6jON4hKHbbnn+vag87TgsQ+w0D05caogumesfQfA==","signatures":[{"sig":"MEUCIQC0VTFEhy7BWsB32l7NgwqVtciv0r5MJ5E9WI78iSC26AIgMmaMjW9yr5UcSwZ+fKhQMyVg6a0xzq68gubfTTGeubk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9101},"engines":{"node":">=0.10.0"},"gitHead":"e562c8d685bdf5cc92eb7be12ae69872f377ab9a","scripts":{"fix":"eslint . --fix","lint":"eslint .","test":"NODE_DEBUG={{name}} nyc ava --timeout=10s --verbose","report":"nyc report --reporter=text-lcov > coverage.lcov && codecov","test:dev":"NODE_DEBUG={{name}} nyc ava --timeout=10s --verbose && npm run report:dev","report:dev":"nyc report --reporter=html && npm run report:open","// posttest":"npm run report","report:open":"open coverage/index.html"},"_npmUser":{"name":"kael","email":"i@kael.me"},"repository":{"url":"git://github.com/kaelzhang/node-argv-split.git","type":"git"},"_npmVersion":"10.8.2","description":"Split argv(argument vector) and handle special cases, such as quoted values.","directories":{},"_nodeVersion":"22.8.0","_hasShrinkwrap":false,"devDependencies":{"ava":"^6.2.0","nyc":"^15.0.1"},"_npmOperationalInternal":{"tmp":"tmp/argv-split_3.1.0_1732035791500_0.6804900805555174","host":"s3://npm-registry-packages"}},"3.2.0":{"name":"argv-split","version":"3.2.0","keywords":["argv","argument-vector","split","quote","quoted-value","balance"],"author":{"name":"Kael"},"license":"MIT","_id":"argv-split@3.2.0","maintainers":[{"name":"kael","email":"i@kael.me"}],"homepage":"https://github.com/kaelzhang/node-argv-split#readme","bugs":{"url":"https://github.com/kaelzhang/node-argv-split/issues"},"ava":{"files":["test/*.js"]},"dist":{"shasum":"e8d8110f334b0b27017363e543b6825bc89d46e7","tarball":"https://registry.npmjs.org/argv-split/-/argv-split-3.2.0.tgz","fileCount":4,"integrity":"sha512-0q1AZPNOl04Bw+cWO39Hb7gn6VBfv4ZuyssnKkvfMJJX44BFuVdJfJ8S9IsrKdCLJaVNVoIt+2xif7bqvBWCug==","signatures":[{"sig":"MEUCIElRKfR2HMZXWSbWOzFJ8PtS6qnQLURrF3Gq2YMtvsXoAiEAzTR1Wbb4rNXoYb2AP/LXK5TCJvZM4kLxz3naL0FjEQg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9618},"engines":{"node":">=0.10.0"},"gitHead":"ce1b75007ddddf93050ae63fc0496f461490ea95","scripts":{"fix":"eslint . --fix","lint":"eslint .","test":"NODE_DEBUG={{name}} nyc ava --timeout=10s --verbose","report":"nyc report --reporter=text-lcov > coverage.lcov && codecov","test:dev":"NODE_DEBUG={{name}} nyc ava --timeout=10s --verbose && npm run report:dev","report:dev":"nyc report --reporter=html && npm run report:open","// posttest":"npm run report","report:open":"open coverage/index.html"},"_npmUser":{"name":"kael","email":"i@kael.me"},"repository":{"url":"git://github.com/kaelzhang/node-argv-split.git","type":"git"},"_npmVersion":"10.8.2","description":"Split argv(argument vector) and handle special cases, such as quoted values.","directories":{},"_nodeVersion":"22.8.0","_hasShrinkwrap":false,"devDependencies":{"ava":"^6.2.0","nyc":"^15.0.1"},"_npmOperationalInternal":{"tmp":"tmp/argv-split_3.2.0_1732036696921_0.8051517231574961","host":"s3://npm-registry-packages"}},"3.2.1":{"name":"argv-split","version":"3.2.1","description":"Split argv(argument vector) and handle special cases, such as quoted values.","scripts":{"test":"NODE_DEBUG={{name}} nyc ava --timeout=10s --verbose","test:dev":"NODE_DEBUG={{name}} nyc ava --timeout=10s --verbose && npm run report:dev","lint":"eslint .","fix":"eslint . --fix","// posttest":"npm run report","report":"nyc report --reporter=text-lcov > coverage.lcov && codecov","report:dev":"nyc report --reporter=html && npm run report:open","report:open":"open coverage/index.html"},"repository":{"type":"git","url":"git://github.com/kaelzhang/node-argv-split.git"},"keywords":["argv","argument-vector","split","quote","quoted-value","balance"],"engines":{"node":">=0.10.0"},"author":{"name":"Kael"},"license":"MIT","bugs":{"url":"https://github.com/kaelzhang/node-argv-split/issues"},"ava":{"files":["test/*.js"]},"devDependencies":{"ava":"^6.2.0","nyc":"^15.0.1"},"_id":"argv-split@3.2.1","gitHead":"5ffe86e4ba6f500749989caaca736ccb282b1cfb","homepage":"https://github.com/kaelzhang/node-argv-split#readme","_nodeVersion":"22.8.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-ZvEsG5KftQrIdEqwMJHFGLP0zNzszqmWd+/qKFCeUDlZRqMTZJNQG4vLcWgRfxYUHSA8Kp6KRwY4R916Gz3Qwg==","shasum":"69fa1c73bd86bc7c2364ccee4faa51d0b630ce2a","tarball":"https://registry.npmjs.org/argv-split/-/argv-split-3.2.1.tgz","fileCount":4,"unpackedSize":9613,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuvK/DvS9t2u9CgtsDVbqNIDa09wmk+ncAxAge4nc/ZQIhAPMYyLnz3+LJzYPCuEN2TrfTZTclmNpfjSR3zzmDZaPu"}]},"_npmUser":{"name":"kael","email":"i@kael.me"},"directories":{},"maintainers":[{"name":"kael","email":"i@kael.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/argv-split_3.2.1_1732036928736_0.6428609769383868"},"_hasShrinkwrap":false}},"time":{"created":"2014-08-13T02:35:09.590Z","modified":"2024-11-19T17:22:09.201Z","0.1.0":"2014-08-13T02:35:09.590Z","0.1.1":"2014-08-13T06:38:52.318Z","1.0.0":"2015-11-21T14:51:34.641Z","1.0.1":"2016-04-16T09:50:09.250Z","2.0.0":"2017-03-25T09:24:27.734Z","2.0.1":"2017-03-25T09:28:41.717Z","3.0.0":"2024-11-19T16:14:14.339Z","3.1.0":"2024-11-19T17:03:11.644Z","3.2.0":"2024-11-19T17:18:17.113Z","3.2.1":"2024-11-19T17:22:09.019Z"},"bugs":{"url":"https://github.com/kaelzhang/node-argv-split/issues"},"author":{"name":"Kael"},"license":"MIT","homepage":"https://github.com/kaelzhang/node-argv-split#readme","keywords":["argv","argument-vector","split","quote","quoted-value","balance"],"repository":{"type":"git","url":"git://github.com/kaelzhang/node-argv-split.git"},"description":"Split argv(argument vector) and handle special cases, such as quoted values.","maintainers":[{"name":"kael","email":"i@kael.me"}],"readme":"[![Build Status](https://github.com/kaelzhang/node-argv-split/actions/workflows/nodejs.yml/badge.svg)](https://github.com/kaelzhang/node-argv-split/actions/workflows/nodejs.yml)\n\n# argv-split\n\nSplit argv(argument vector) and handle special cases, such as quoted or escaped values.\n\n## Why?\n\n```js\nconst split = require('split')\n\nconst mkdir = 'mkdir \"foo bar\"'\nmkdir.split(' ')    // ['mkdir', '\"foo', 'bar\"']  -> Oops!\nsplit(mkdir)        // ['mkdir', 'foo bar']       -> Oh yeah!\n\nconst mkdir2 = 'mkdir foo\\\\ bar'.split(' ')\nmkdir2.split(' ')   // ['mkdir', 'foo\\\\', 'bar']  -> Oops!\nsplit(mkdir2)       // ['mkdir', 'foo bar']       -> Oh yeah!\n```\n\n## `argv-split` handles all special cases with complete unit tests.\n\n```sh\n# shell command:        javascript array:\nfoo a\\ b                # ['foo', 'a b']\nfoo \\'                  # ['foo', '\\\\\\'']\nfoo \\\"                  # ['foo', '\\\\\"']\nfoo \"a b\"               # ['foo', 'a b']\nfoo \"a\\ b\"              # ['foo', 'a\\\\ b']\nfoo '\\'                 # ['foo', '\\\\']\nfoo --abc=\"a b\"         # ['foo', '--abc=a b']\nfoo --abc=a\\ b          # ['foo', '--abc=a b']\n\n# argv-split also handles line feeds\nfoo \\\n    --abc=a\\ b          # ['foo', '--abc=a b']\n\n# etc\n```\n\n```js\nsplit('foo \\\\\\n    --abc=a\\\\ b')    // ['foo', '--abc=a b']\n```\n\n## Error Codes\n\n### `UNMATCHED_SINGLE`\n\nIf a command missed the closing single quote, the error will throw:\n\nShell command:\n\n```sh\nfoo --abc 'abc\n```\n\n```js\ntry {\n  split('foo --abc \\'abc')\n} catch (e) {\n  console.log(e.code)   // 'UNMATCHED_SINGLE'\n}\n```\n\n### `UNMATCHED_DOUBLE`\n\nIf a command missed the closing double quote, the error will throw:\n\n```sh\nfoo --abc \"abc\n```\n\n### `ESCAPED_EOF`\n\nIf a command unexpectedly ends with a `\\`, the error will throw:\n\n```sh\nfoo --abc a\\# if there is nothing after \\, the error will throw\nfoo --abc a\\ # if there is a whitespace after, then -> ['foo', '--abc', 'a ']\n```\n\n### `NON_STRING`\n\nIf the argument passed to `split` is not a string, the error will throw\n\n```js\nsplit(undefined)\n```\n\n## Install\n\n```sh\n$ npm i argv-split\n```\n\n# Methods\n\n## split(string) -> Array<string>\n\nSplits a string, and balance quoted parts. The usage is quite simple, see examples above.\n\nReturns `Array<string>`\n\n\n## split.join(args, options?) -> string\n\nJoin the given array of argument vectors into a valid argument string\n\nNew in `3.1.0`\n\n- **args** `Array<string>` arguments to be joined\n- **options?** `Object=`\n  - **quote** `string=\"` should we use single quote or double quote when a certain argument needs to be quoted. Defaults to `\"`\n\n```js\n'command ' + join(['foo \"bar', \"'baz\"])\n\n// command \"foo \\\"bar\" \"'baz\"\n```\n\n### Handle Line Feeds\n\nThere is a special value of `split.LF` which could help us to create valid commands with line feeds:\n\n```js\n'kubectl' + join(['apply', '--prune', '-f', 'manifest.yaml', split.LF, '-l', 'app=nginx'])\n\n// kubectl apply --prune -f manifest.yaml \\\n// -l app=nginx\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","users":{"chocolateboy":true}}