{"name":"split-on-first","version":"2.0.1","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","once","occurrence","separator","delimiter","text"],"devDependencies":{"ava":"^2.4.0","tsd":"^0.10.0","xo":"^0.25.3"},"gitHead":"02a913862bc05f800659743738c9615fdd4e63f0","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.1","_nodeVersion":"10.22.1","_npmVersion":"6.14.9","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-QYVfBX7wnUpBsc1DZ1sPrYnBHvrtJRYyKnsdvHYf+euflmVeBTth2/yjt9f1VIG5WLzNj4IBrL3on5iMrycLQg==","shasum":"a01fd731d050aa610e3898242a0d11b1a56e990b","tarball":"http://registry-npm.ywwl.com/split-on-first/download/split-on-first-2.0.1.tgz","fileCount":5,"unpackedSize":3823,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfuqWnCRA9TVsSAnZWagAA940P/RA3hGqWZXMyEdSPETVD\n90YkEriQ7YQDZScQYziQdXCuv4vNWUI8lDkMR0FTk4scS4TtEPEwwh7Xd+2G\ngpkWDafJ6F8AGiXCsfbM/7t9aYg0NmwJad4Mg/HrV+qg0/YiMOj9jTe9YRsL\n23p49+pjDZfv8HTF4YBKAfw0iIZC88jOFCFlbJUZaOmEdyjlRGW7IHdxRK3X\noXIyttK2m2Di3nvnWp2sR9qHDNv4rOfpPtVsJhO1OhA0kINeRdUksemOCcW2\nlsb23CsBDKH36UJafBmW6tu2EGDgckeW2V3f+YfxlvSAHITC8XMPDc099qfU\nJZju2AGiKyW6N0cCeRe88UVFLHiYgsjs9zn0Ap9xikfIHGxcw1psvmdxWoTk\nmwTSvwwx6xJrmDEnD+fWpLcRUvXZ/JnZkh4Z3eMBAr/z5Dt5/ayjhafJUn6h\nHawKkYOOLcbuWlAGhTxFoTybGEKUmlyErklGG2MgYPHSVVGJJxS9IaGnRzAe\nxq4H/13tb6HOTbHzpfBEFNTJB3LgPfDSiN+dAG23FeKi7AWXrHggr/aU95E9\n+rEtLgUf8rt5kIZMNJhj+uSeECfk+lw08LKSEnOYMBdhLpuRKvvntAEvw54j\nwISBR12EoYbQnMheK3OHm84HKT05UU8STQYB2tGTmezgLavC6BglPVFCFuno\noTGx\r\n=C/aF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3tkUqvj7A+DJSq/0ECZRCqsBtEEwGuRGXoEhM6bVsFQIhAOLr1pqFCNV6Y/hWQLZh749Yc3AaskeksJe9ICpxqsmz"}],"size":1889,"noattachment":false,"key":"/split-on-first/-/split-on-first-2.0.1.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/split-on-first_2.0.1_1606067623380_0.2207000932295844"},"_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":1606067623496,"_cnpm_publish_time":1606067623496,"dist-tags":{"latest":"4.0.0"}}