{"name":"split-on-first","version":"2.0.0","description":"Split a string on the first occurance of a given separator","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/split-on-first.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["split","string","first","occurrence","separator","delimiter","text"],"devDependencies":{"ava":"^2.4.0","tsd":"^0.10.0","xo":"^0.25.3"},"gitHead":"1cba7583680c024b333c3653170bba9a72008805","bugs":{"url":"https://github.com/sindresorhus/split-on-first/issues"},"homepage":"https://github.com/sindresorhus/split-on-first#readme","_id":"split-on-first@2.0.0","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-iyIJmK6ejgeMcW2qS+UgM6zcuOAud9FE/3kDmNQsJhfO43JPn2oLhNx7/Iu+2/VDIfXHM+k7P38TYA8DungeBw==","shasum":"6532300e408c285415c757e1464e952bfa20fec4","tarball":"http://registry-npm.ywwl.com/split-on-first/download/split-on-first-2.0.0.tgz","fileCount":5,"unpackedSize":3796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdy7gECRA9TVsSAnZWagAAzTcQAJhSMSLA1w3cyJIY9xUd\nUwHnE858FFS/0nZoUH0tKMtIul+FBUauFJi7daTKQXI7TMeYZM2D7rNcQCB9\nayFDEULtZQUe/ado6jFCtajTlZfQr4khykX5cyNwHVi/cvAmDUQbkJopSxSz\nnvJg/Muxv3rwE71gzjcDlB5BU+QeADwAd/ylVFkInBovBtwCwzepGJydByWJ\n9sIe4iUt4+OZyRSG4QwyLQBowK3jr4b2+4f/LYAjsI+FppCcn4FFRvMy9GuE\nOV5dBP3KkFpynq5dlUn8O/YeoEqBwyhlj7IOYeOogQN3q+t0vmn7FDWkl8Gv\nBqQk3SEXcVkPzu2xaIzptuOLewneTsXABsknEqtQ8IRc603eixmMTVEbNi7S\nvzzTvisMpBUF0aNy0aWZ0zb4uFZfQu5zKnFLrixdtFGPjjo4sNpnq/yBStFp\n0vHni1uMh3ff1lneNLAGt+tC/esn2R88nrbnsycUcG4rl+39h/ZoIjVeqhvL\nSyZFxuRYbODEMSi82zJ3RrJ2we/sh1Z1x4hbVQjVaaGevn2Zdv/cK4HX4OkB\nsQH4B3jA25eZKqOYe+eQoyvjdKtpAGGxLco0nWdObH09VGg8dCX1uIq7ieFK\nx+xiO+Cg3RZqKBo9PbVJ4i1wrxytqA4cyzrznvJdaA3OkPkd9oZN6nR5ZulZ\nH0Vt\r\n=xJYU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGo0a9mEs0cr3xZw9BnGknUbz9CoJRUgCl8XCcC8828cAiA1IQLJouL8yvBbPbuMWlbO5k5u3wr24V5oLJYntZErEg=="}],"size":1879,"noattachment":false,"key":"/split-on-first/-/split-on-first-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/split-on-first_2.0.0_1573632004471_0.9440429914521933"},"_hasShrinkwrap":false,"readme":"# split-on-first\n\n> Split a string on the first occurrence of a given separator\n\nThis is similar to [`String#split()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split), but that one splits on all the occurrences, not just the first one.\n\n## Install\n\n```\n$ npm install split-on-first\n```\n\n## Usage\n\n```js\nimport splitOnFirst from 'split-on-first';\n\nsplitOnFirst('a-b-c', '-');\n//=> ['a', 'b-c']\n\nsplitOnFirst('key:value:value2', ':');\n//=> ['key', 'value:value2']\n\nsplitOnFirst('a---b---c', '---');\n//=> ['a', 'b---c']\n\nsplitOnFirst('a-b-c', '+');\n//=> []\n\nsplitOnFirst('abc', '');\n//=> []\n```\n\n## API\n\n### splitOnFirst(string, separator)\n\n#### string\n\nType: `string`\n\nThe string to split.\n\n#### separator\n\nType: `string`\n\nThe separator to split on.\n\n## Related\n\n- [split-at](https://github.com/sindresorhus/split-at) - Split a string at one or more indices\n","publish_time":1573632004589,"_cnpm_publish_time":1573632004589,"dist-tags":{"latest":"4.0.0"}}