{"name":"split-at","version":"3.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"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["split","cut","at","string","text","index","indexes","indices"],"dependencies":{"array-uniq":"^3.0.0","arrify":"^3.0.0","num-sort":"^3.0.0"},"devDependencies":{"ava":"^3.15.0","tsd":"^0.14.0","xo":"^0.39.1"},"gitHead":"b20441c4c46fd303b98c91f333b1ad529ae04ce5","bugs":{"url":"https://github.com/sindresorhus/split-at/issues"},"homepage":"https://github.com/sindresorhus/split-at#readme","_id":"split-at@3.0.0","_nodeVersion":"16.0.0","_npmVersion":"7.10.0","dist":{"integrity":"sha512-CXacHHs293c+c6+V5LYOqlZq5oohV44vXP1vYex+8HoDpGdhEMpqh7gj6bOYxMVJW0YzDi/OuOz4Ghux+v19yw==","shasum":"61043533652450219e5f84b3526b1a3f7e3293d3","tarball":"http://registry-npm.ywwl.com/split-at/download/split-at-3.0.0.tgz","fileCount":5,"unpackedSize":4702,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkFWvCRA9TVsSAnZWagAAmRwP/iCMpAyqnoaKwh0leP+L\nlZf/9GYC+7hmahNuwyvIYcF6Lkf5JsUk87zQNLDPpN503LHPjomsgP1uBr3v\nj5mU7VPEBgpBnBiBhIFqTLpHjrPxz8yCUXvx2MhkfPjx/C8T92UaCVU+Jivk\nl2dPBbN7f9WZPaSAKFZZl1irsHc+ZYZ/Rf151nIVgExvz7iM/I4pU/xCCUF0\noip7cJAIA2eLxKqy6bn9fn5/kzjAMLhx53mPl4CrMqyUmfjWuskwdtWxtfOK\nYZhs0lVi0y1aJ71nKIyo+gVwa9yzbQwqxh44pZAEiyQjHWEdMECaUwzyDfJU\n6WH9JkVBnHJ3chMEhSPEeEWRVdTGm+ttDa4a9Ux2/TXJIZ4bh//w1oNf6WDj\n1XbKtVnX8WRLJeHEkf1M+BHRfG+SULxfqSqUoo0liVh4HBoB9HHj9Xud6j+E\nvF37hRD/WTscVWfy5B222ziFEN6P4JmRyLMU3KdZH1KYTQTuswe1Oxpxsvay\nMbV5YajnxsAB9d0xKOCMujNaSIQv2gI/0w/arsdh+HgTyvtk5WqXfm9thBAz\nGQaw+nlMmmMAxASeL+47bcd5B5tJCd56wf/eYFVxfU8hQrZa61SCQreu+OXI\nst2tzSNio+xG9sPlda+53yan3xfORA5tOyyJiwLF6ezYQKsCoEC5fCERkTn+\nbYMS\r\n=izyI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICu0l/uLYdt7uDnWcE3wKu4rDeiDcId+PM7sIoIpWSk2AiB4QfxCgbeRcpUNIV5fQpryyT56IqOOSPCB7gZrlPA/+w=="}],"size":2101,"noattachment":false,"key":"/split-at/-/split-at-3.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/split-at_3.0.0_1620071855233_0.47962171384835006"},"_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":1620071855360,"_cnpm_publish_time":1620071855360,"dist-tags":{"latest":"3.0.0"}}