{"_id":"micromark-util-chunked","_rev":"267319","name":"micromark-util-chunked","description":"micromark utility to splice and push with giant arrays","dist-tags":{"latest":"1.0.0","next":"1.0.0-beta.1"},"maintainers":[{"name":"npm:wooorm","email":""},{"name":"wooorm","email":""}],"time":{"modified":"2023-03-27T19:09:10.000Z","created":"2021-06-07T09:26:10.720Z","1.0.0":"2021-06-22T19:03:55.189Z","1.0.0-beta.1":"2021-06-20T12:13:07.868Z","1.0.0-alpha.3":"2021-06-16T17:18:21.446Z","1.0.0-alpha.2":"2021-06-07T13:35:51.746Z","1.0.0-alpha.1":"2021-06-07T09:26:10.720Z"},"users":{},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"repository":{"type":"git","url":"git+https://github.com/micromark/micromark.git#main"},"versions":{"1.0.0":{"name":"micromark-util-chunked","version":"1.0.0","description":"micromark utility to splice and push with giant arrays","license":"MIT","keywords":["micromark","util","utility","chunk","splice","push"],"repository":{"type":"git","url":"git+https://github.com/micromark/micromark.git#main"},"bugs":{"url":"https://github.com/micromark/micromark/issues"},"funding":[{"type":"GitHub Sponsors","url":"https://github.com/sponsors/unifiedjs"},{"type":"OpenCollective","url":"https://opencollective.com/unified"}],"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"dev/index.d.ts","exports":{"development":"./dev/index.js","default":"./index.js"},"dependencies":{"micromark-util-symbol":"^1.0.0"},"scripts":{"build":"rimraf \"*.d.ts\" \"{dev/,lib/}**/*.d.ts\" && tsc && micromark-build && type-coverage"},"xo":false,"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"homepage":"https://github.com/micromark/micromark/tree/main#readme","_id":"micromark-util-chunked@1.0.0","_nodeVersion":"16.2.0","_npmVersion":"7.18.1","dist":{"shasum":"5b40d83f3d53b84c4c6bce30ed4257e9a4c79d06","size":2896,"noattachment":false,"key":"/micromark-util-chunked/-/micromark-util-chunked-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/micromark-util-chunked/download/micromark-util-chunked-1.0.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"npm:wooorm","email":""},{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/micromark-util-chunked_1.0.0_1624388635094_0.0746194289355191"},"_hasShrinkwrap":false,"publish_time":1624388635189,"_cnpm_publish_time":1624388635189,"_cnpmcore_publish_time":"2021-12-14T05:34:30.049Z"},"1.0.0-beta.1":{"name":"micromark-util-chunked","version":"1.0.0-beta.1","description":"micromark utility to splice and push with giant arrays","license":"MIT","keywords":["micromark","util","utility","chunk","splice","push"],"repository":{"type":"git","url":"git+https://github.com/micromark/micromark.git#main"},"bugs":{"url":"https://github.com/micromark/micromark/issues"},"funding":[{"type":"GitHub Sponsors","url":"https://github.com/sponsors/unifiedjs"},{"type":"OpenCollective","url":"https://opencollective.com/unified"}],"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"dev/index.d.ts","exports":{"development":"./dev/index.js","default":"./index.js"},"dependencies":{"micromark-util-symbol":"^1.0.0-beta.1"},"scripts":{"build":"rimraf \"*.d.ts\" \"{dev/,lib/}**/*.d.ts\" && tsc && micromark-build && type-coverage"},"xo":false,"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"readmeFilename":"readme.md","homepage":"https://github.com/micromark/micromark/tree/main#readme","_id":"micromark-util-chunked@1.0.0-beta.1","_nodeVersion":"16.2.0","_npmVersion":"7.18.1","dist":{"shasum":"f270b8bac1638ab5b7dbb675dff25d1bbbb891fb","size":2906,"noattachment":false,"key":"/micromark-util-chunked/-/micromark-util-chunked-1.0.0-beta.1.tgz","tarball":"http://name.csiicloud.com:7001/micromark-util-chunked/download/micromark-util-chunked-1.0.0-beta.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"npm:wooorm","email":""},{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/micromark-util-chunked_1.0.0-beta.1_1624191187720_0.5005057005956175"},"_hasShrinkwrap":false,"publish_time":1624191187868,"_cnpm_publish_time":1624191187868,"_cnpmcore_publish_time":"2021-12-14T05:34:30.273Z"},"1.0.0-alpha.3":{"name":"micromark-util-chunked","version":"1.0.0-alpha.3","description":"micromark utility to splice and push with giant arrays","license":"MIT","keywords":["micromark","util","utility","chunk","splice","push"],"repository":{"type":"git","url":"git+https://github.com/micromark/micromark.git#main"},"bugs":{"url":"https://github.com/micromark/micromark/issues"},"funding":[{"type":"GitHub Sponsors","url":"https://github.com/sponsors/unifiedjs"},{"type":"OpenCollective","url":"https://opencollective.com/unified"}],"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"dev/index.d.ts","exports":{"development":"./dev/index.js","default":"./index.js"},"dependencies":{"micromark-util-symbol":"^1.0.0-alpha.3"},"scripts":{"build":"rimraf \"*.d.ts\" \"{dev/,lib/}**/*.d.ts\" && tsc && micromark-build && type-coverage"},"xo":false,"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"readmeFilename":"readme.md","homepage":"https://github.com/micromark/micromark/tree/main#readme","_id":"micromark-util-chunked@1.0.0-alpha.3","_nodeVersion":"16.2.0","_npmVersion":"7.16.0","dist":{"shasum":"9bf9ff8e006d4f3297c9d71a6cf82014adf757b9","size":2905,"noattachment":false,"key":"/micromark-util-chunked/-/micromark-util-chunked-1.0.0-alpha.3.tgz","tarball":"http://name.csiicloud.com:7001/micromark-util-chunked/download/micromark-util-chunked-1.0.0-alpha.3.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"npm:wooorm","email":""},{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/micromark-util-chunked_1.0.0-alpha.3_1623863901337_0.25431129794132"},"_hasShrinkwrap":false,"publish_time":1623863901446,"_cnpm_publish_time":1623863901446,"_cnpmcore_publish_time":"2021-12-14T05:34:30.486Z"},"1.0.0-alpha.2":{"name":"micromark-util-chunked","version":"1.0.0-alpha.2","description":"micromark utility to splice and push with giant arrays","license":"MIT","keywords":["micromark","util","utility","chunk","splice","push"],"repository":{"type":"git","url":"git+https://github.com/micromark/micromark.git#main"},"bugs":{"url":"https://github.com/micromark/micromark/issues"},"funding":[{"type":"GitHub Sponsors","url":"https://github.com/sponsors/unifiedjs"},{"type":"OpenCollective","url":"https://opencollective.com/unified"}],"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"dev/index.d.ts","exports":{"development":"./dev/index.js","default":"./index.js"},"dependencies":{"micromark-util-symbol":"^1.0.0-alpha.2"},"scripts":{"build":"rimraf \"*.d.ts\" \"{dev/,lib/}**/*.d.ts\" && tsc && micromark-build && type-coverage"},"xo":false,"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"readmeFilename":"readme.md","homepage":"https://github.com/micromark/micromark/tree/main#readme","_id":"micromark-util-chunked@1.0.0-alpha.2","_nodeVersion":"16.2.0","_npmVersion":"7.15.1","dist":{"shasum":"f691b5f139788f68d30e209a9e92e00d620f54a6","size":2905,"noattachment":false,"key":"/micromark-util-chunked/-/micromark-util-chunked-1.0.0-alpha.2.tgz","tarball":"http://name.csiicloud.com:7001/micromark-util-chunked/download/micromark-util-chunked-1.0.0-alpha.2.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"npm:wooorm","email":""},{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/micromark-util-chunked_1.0.0-alpha.2_1623072951635_0.4621954712204399"},"_hasShrinkwrap":false,"publish_time":1623072951746,"_cnpm_publish_time":1623072951746,"_cnpmcore_publish_time":"2021-12-14T05:34:30.665Z"},"1.0.0-alpha.1":{"name":"micromark-util-chunked","version":"1.0.0-alpha.1","description":"micromark utility to splice and push with giant arrays","license":"MIT","keywords":["micromark","util","utility","chunk","splice","push"],"repository":{"type":"git","url":"git+https://github.com/micromark/micromark.git#main"},"bugs":{"url":"https://github.com/micromark/micromark/issues"},"funding":[{"type":"GitHub Sponsors","url":"https://github.com/sponsors/unifiedjs"},{"type":"OpenCollective","url":"https://opencollective.com/unified"}],"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"type":"module","main":"index.js","types":"dev/index.d.ts","exports":{"development":"./dev/index.js","default":"./index.js"},"dependencies":{"micromark-util-symbol":"^1.0.0-alpha.1"},"scripts":{"build":"rimraf \"*.d.ts\" \"{dev/,lib/}**/*.d.ts\" && tsc && micromark-build && type-coverage"},"xo":false,"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"homepage":"https://github.com/micromark/micromark/tree/main#readme","_id":"micromark-util-chunked@1.0.0-alpha.1","_nodeVersion":"16.2.0","_npmVersion":"7.15.1","dist":{"shasum":"c65ec18c141c539425fda5549af01b79b3d9fca1","size":2893,"noattachment":false,"key":"/micromark-util-chunked/-/micromark-util-chunked-1.0.0-alpha.1.tgz","tarball":"http://name.csiicloud.com:7001/micromark-util-chunked/download/micromark-util-chunked-1.0.0-alpha.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"npm:wooorm","email":""},{"name":"wooorm","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/micromark-util-chunked_1.0.0-alpha.1_1623057970623_0.23569791538753915"},"_hasShrinkwrap":false,"publish_time":1623057970720,"_cnpm_publish_time":1623057970720,"_cnpmcore_publish_time":"2021-12-14T05:34:30.930Z"}},"readme":"# micromark-util-chunked\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][bundle-size-badge]][bundle-size]\n[![Sponsors][sponsors-badge]][opencollective]\n[![Backers][backers-badge]][opencollective]\n[![Chat][chat-badge]][chat]\n\nmicromark utility to splice and push with giant arrays.\n\n## Contents\n\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`push(list, items)`](#pushlist-items)\n    *   [`splice(list, start, remove, items)`](#splicelist-start-remove-items)\n*   [Security](#security)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## Install\n\n[npm][]:\n\n```sh\nnpm install micromark-util-chunked\n```\n\n## Use\n\n```js\nimport {push, splice} from 'micromark-util-chunked'\n\n// …\n\nnextEvents = push(nextEvents, [\n  ['enter', events[open][1], context],\n  ['exit', events[open][1], context]\n])\n\n// …\n\nsplice(events, open - 1, index - open + 3, nextEvents)\n\n// …\n```\n\n## API\n\nThis module exports the following identifiers: `push`, `splice`.\nThere is no default export.\n\n### `push(list, items)`\n\nAppend `items` (an array) at the end of `list` (another array).\nWhen `list` was empty, returns `items` instead.\n\nThis prevents a potentially expensive operation when `list` is empty,\nand adds items in batches to prevent V8 from hanging.\n\n###### Parameters\n\n*   `list` (`unknown[]`) — List to operate on\n*   `items` (`unknown[]`) — Items to add to `list`\n\n###### Returns\n\n`list` or `items`\n\n### `splice(list, start, remove, items)`\n\nLike `Array#splice`, but smarter for giant arrays.\n\n`Array#splice` takes all items to be inserted as individual argument which\ncauses a stack overflow in V8 when trying to insert 100k items for instance.\n\nOtherwise, this does not return the removed items, and takes `items` as an\narray instead of rest parameters.\n\n###### Parameters\n\n*   `list` (`unknown[]`) — List to operate on\n*   `start` (`number`) — Index to remove/insert at (can be negative)\n*   `remove` (`number`) — Number of items to remove\n*   `items` (`unknown[]`) — Items to inject into `list`\n\n###### Returns\n\n`void`\n\n## Security\n\nSee [`security.md`][securitymd] in [`micromark/.github`][health] for how to\nsubmit a security report.\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`micromark/.github`][health] for ways\nto get started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organisation, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/micromark/micromark/workflows/main/badge.svg\n\n[build]: https://github.com/micromark/micromark/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/micromark/micromark.svg\n\n[coverage]: https://codecov.io/github/micromark/micromark\n\n[downloads-badge]: https://img.shields.io/npm/dm/micromark-util-chunked.svg\n\n[downloads]: https://www.npmjs.com/package/micromark-util-chunked\n\n[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-util-chunked.svg\n\n[bundle-size]: https://bundlephobia.com/result?p=micromark-util-chunked\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[opencollective]: https://opencollective.com/unified\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/micromark/micromark/discussions\n\n[license]: https://github.com/micromark/micromark/blob/main/license\n\n[author]: https://wooorm.com\n\n[health]: https://github.com/micromark/.github\n\n[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md\n\n[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md\n\n[support]: https://github.com/micromark/.github/blob/HEAD/support.md\n\n[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md\n","_attachments":{},"homepage":"https://github.com/micromark/micromark/tree/main#readme","bugs":{"url":"https://github.com/micromark/micromark/issues"},"license":"MIT"}