{"name":"split-at","version":"2.0.0","description":"Split a string at one or more indices","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/split-at.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["split","cut","at","string","text","index","indexes","indices"],"dependencies":{"array-uniq":"^2.1.0","arrify":"^2.0.1","num-sort":"^2.0.0"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"3f3b5c346d100802484bd72996a398851e3a6b27","bugs":{"url":"https://github.com/sindresorhus/split-at/issues"},"homepage":"https://github.com/sindresorhus/split-at#readme","_id":"split-at@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-Els/ZPH54+VRTLmwC0yRLyLlXH7WPh39DTLRSDzjv4t+O95q55dJBICoz25erNvUvsAAVBmC/VKwh5GkuIKHLw==","shasum":"5bfe233e6d7eeb5c59290a9bf08691f5f1005737","tarball":"http://registry-npm.ywwl.com/split-at/download/split-at-2.0.0.tgz","fileCount":5,"unpackedSize":4828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcvuhxCRA9TVsSAnZWagAAH5kQAJQqsQWNKNGBNVV7j3S6\nBIA41gHDL+C3hcEO6fjWjH6fx0lpvXcE3m6KMBXbXUekmAnl+XlD9EbX/fNX\neQJQ/EZMuR6o4pmKcSWvKMyQyekz06eL29jH5QimpeDNfkX2fZ3BONjy7k+g\n8ZO+QTQHNkUjME1dk8780IM+aOPOFgO06pesJx2wyUO1SYXUO84p1fFMB9dY\nYzXoJ0ffBefLRrwcju5KrZVofDD0MV29n1IlaAskE1vZCp32jzUrjn2bsmiy\ndDV6AloHfyzEQrFQdZ0ODvlQrXwNOAG4SsS0ymqGZO5U/UgRKL3juRhfwNVp\nmXNSA1IszHp5mrDW75EPqOM2ZZEF7pr/NB7HVKV4NyuPicqXtHEzO+FEs0eV\nrhXWK+GhorhdWu/O9d5LpQNpsdDOK6G1j3zRqEIJXSSNsvxD+6syqzhZuDCh\na+g9p2lEZotvEZuwCQpOICSLSm5EfneVaNZxeWLFxgA9J+3ntOYM7cn7Ywep\nD3Beuvp9kAihmwIob2A0Cwc1YFm6oZ0VUGVORN2ug730rw3ARVnKxBVQtiqm\n8DQtOGmMIicwxH50QzeQBrVeN7cZSARqh+caC6B6xRyGhWotNLWVKvzqen9M\n0IgrfcuT5lq+9zvQjhjdNHkGTdSN2iWgFotx81XVujKoLhVbMG8w7W5pW+si\nlVVl\r\n=tipf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqaJSpG8qoQ1XQAqIz95hkKfnDNENLsdGgYWU+PDUiRQIgGRNEt4d2QkCjVwaMofKdWQ0i7ysJuw1zrIMVKsU7gOo="}],"size":2194,"noattachment":false,"key":"/split-at/-/split-at-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/split-at_2.0.0_1556015216951_0.5972694522534987"},"_hasShrinkwrap":false,"readme":"# split-at\n\n> Split a string at one or more indices\n\n## Install\n\n```\n$ npm install split-at\n```\n\n## Usage\n\n```js\nimport splitAt from 'split-at';\n\nsplitAt('unicorn', 2);\n//=> ['uni', 'corn']\n\nsplitAt('unicorn', -2);\n//=> ['unico', 'rn']\n\nsplitAt('unicorn&rainbow', [6, 7]);\n//=> ['unicorn', '&', 'rainbow']\n\nsplitAt('unicorn&rainbow', 7, {remove: true});\n//=> ['unicorn', 'rainbow']\n```\n\n## API\n\n### splitAt(string, index, options?)\n\n#### string\n\nType: `string`\n\nString to be split.\n\n#### index\n\nType: `number | number[]`\n\nOne or more indices. A negative index is a 1-based position from the end of the string. For example, -1 is the index of the last place in the string. Duplicate indices are removed from the `index` array. A negative index and positive index that refer to the same position in the string are treated as duplicates.\n\n#### options\n\nType: `object`\n\n##### remove\n\nType: `boolean`\\\nDefault: `false`\n\nRemove the chosen indices.\n\nSimilar to the default `String#split` behaviour.\n\n## Related\n\n- [split-on-first](https://github.com/sindresorhus/split-on-first) - Split a string on the first occurrence of a given separator\n","publish_time":1556015217123,"_cnpm_publish_time":1556015217123,"dist-tags":{"latest":"3.0.0"}}