{"name":"split-on-first","version":"1.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":">=6"},"scripts":{"test":"xo && ava"},"keywords":["split","string","first","occurrence","separator","delimiter","text"],"devDependencies":{"ava":"^1.2.0","xo":"^0.24.0"},"gitHead":"13d4a7d4c7d67a7371f6626c195132c1cc908ea1","bugs":{"url":"https://github.com/sindresorhus/split-on-first/issues"},"homepage":"https://github.com/sindresorhus/split-on-first#readme","_id":"split-on-first@1.0.0","_npmVersion":"6.5.0","_nodeVersion":"10.15.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-mjA57TQtdWztVZ9THAjGNpgbuIrNfsNrGa5IyK94NoPaT4N14M+GI4jD7t4arLjFkYRQWdETC5RxFzLWouoB3A==","shasum":"648af4ce9a28fbcaadd43274455f298b55025fc6","tarball":"http://registry-npm.ywwl.com/split-on-first/download/split-on-first-1.0.0.tgz","fileCount":4,"unpackedSize":3229,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXAjuCRA9TVsSAnZWagAA8SgP/iYmw5mR8eU0tV7NPhIK\n5OUr56AMdChNMOWW9fh7FTvBP92iUJf+aaYG5HasE5K9pTaNNyCBdAbW+q8i\nIpsES9Q9Q1G7738lCOjcdi2htZJzQatcs+9k+6jZu2V5B495tWz+FirJsk1l\nLuzm5auiiAeoHfLwqh5Er2I1jsR8MQLGKHbQaNDOyx1uKHm9I1e/7/KXnBLp\nSRjK2QkBT9NE92sptxr9mAcTcnNSTvoOB9lbcQk6dHBDl9VUAaJDrJhKNZVD\nQjaPM+cLKobxznOlSgYiaCS6iJJe0pIuX9np8cazw/oX5/M//YzUJevpFOP6\n7ILBZFynmpmeguCqKf5/6ANcYWcjCOiFhVv9AwguFyDvmB+q+cJw6EDxD3q0\nLONIGNlouj0ieLQ9wTUFQlZvMnavrpX2nyNTRdleeywO6uz2OiY9U10rBTlR\nuvWgeU9zJjQX6iREUh6/RribnkKFQLgIDOIsfEk6wBwnQU2EqcczifY7QVWc\nFbygyK4D1GQkATdQ6qVQG02UE2asZP6MpSWIqCSuEVk1aXA2I86dd1KwcLPW\n2DshI/eHPnWkBEFUYor/CKEkvRpPmW0diPLD57MSMf/4T+CpcfLmKMl0T6Qs\n4gOQp9Mrp7JOvguxj+5AjK5bLz9qFjN35/snPq7FoRbYIIGPR6vbfeqgZjrz\nJ/id\r\n=Nu/p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHVUSJR0PQOSgGQf1fQOxT77fX+E9ZelQwqQVnq8ojSkAiA4EF39R5YpK/roxhabwJBOoUUbPXyoAlCHSpdfTnJlnQ=="}],"size":1754,"noattachment":false,"key":"/split-on-first/-/split-on-first-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/split-on-first_1.0.0_1549535469644_0.9418896824901093"},"_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":1549535469773,"_cnpm_publish_time":1549535469773,"dist-tags":{"latest":"4.0.0"}}