{"id":15862214,"url":"https://github.com/afeiship/next-chunk","last_synced_at":"2026-05-03T02:41:16.742Z","repository":{"id":57122660,"uuid":"105116190","full_name":"afeiship/next-chunk","owner":"afeiship","description":"Creates an array of elements split into groups the length of size.","archived":false,"fork":false,"pushed_at":"2022-09-15T05:16:10.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T22:55:53.515Z","etag":null,"topics":["blob","buffer","chunk","each","each-slice","file","next","slice"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/afeiship.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-28T07:27:07.000Z","updated_at":"2022-09-15T05:13:18.000Z","dependencies_parsed_at":"2022-08-25T00:51:24.170Z","dependency_job_id":null,"html_url":"https://github.com/afeiship/next-chunk","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-chunk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-chunk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-chunk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-chunk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afeiship","download_url":"https://codeload.github.com/afeiship/next-chunk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709936,"owners_count":20821298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blob","buffer","chunk","each","each-slice","file","next","slice"],"created_at":"2024-10-05T22:25:40.838Z","updated_at":"2026-05-03T02:41:11.723Z","avatar_url":"https://github.com/afeiship.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# next-chunk\n\u003e Creates an array of elements split into groups the length of size.\n\n[![version][version-image]][version-url]\n[![license][license-image]][license-url]\n[![size][size-image]][size-url]\n[![download][download-image]][download-url]\n\n## installation\n```bash\nnpm install -S @jswork/next-chunk\n```\n\n## apis\n| api      | type              | description         |\n| -------- | ----------------- | ------------------- |\n| nx.chunk | (inArray,inChunk) | Create split chunks |\n\n## usage\n```js\nimport '@jswork/next-chunk';\n\n// array\nconst arr = [1,2,3,4,5,6,7,8];\nconst res = nx.chunk(arr, 3);\n// result:\n// [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8 ] ]\n\n\n// buffer/file\nconst file =new File([\"foobar\"], \"foo.txt\", {\n  type: \"text/plain\",\n});\n\n// result:\nconst res = nx.chunk(file, 2);\n// [ Blob, Blob, Blob ] \n```\n\n## license\nCode released under [the MIT license](https://github.com/afeiship/next-chunk/blob/master/LICENSE.txt).\n\n[version-image]: https://img.shields.io/npm/v/@jswork/next-chunk\n[version-url]: https://npmjs.org/package/@jswork/next-chunk\n\n[license-image]: https://img.shields.io/npm/l/@jswork/next-chunk\n[license-url]: https://github.com/afeiship/next-chunk/blob/master/LICENSE.txt\n\n[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-chunk\n[size-url]: https://github.com/afeiship/next-chunk/blob/master/dist/next-chunk.min.js\n\n[download-image]: https://img.shields.io/npm/dm/@jswork/next-chunk\n[download-url]: https://www.npmjs.com/package/@jswork/next-chunk\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Fnext-chunk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafeiship%2Fnext-chunk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Fnext-chunk/lists"}