{"_id":"@chonkiejs/chunk","_rev":"11-c39347f436893a3d613dc7414effa66c","name":"@chonkiejs/chunk","dist-tags":{"latest":"0.10.1"},"versions":{"0.5.0":{"name":"@chonkiejs/chunk","version":"0.5.0","keywords":["chunking","text","simd","nlp","tokenization","rag","wasm","webassembly","chonkie"],"author":{"name":"Bhavnick Minhas"},"license":"MIT OR Apache-2.0","_id":"@chonkiejs/chunk@0.5.0","maintainers":[{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"}],"homepage":"https://github.com/chonkie-inc/chunk#readme","bugs":{"url":"https://github.com/chonkie-inc/chunk/issues"},"dist":{"shasum":"086bca0e431d4a0acd93ad0227b81d0bbe4289b1","tarball":"https://registry.npmjs.org/@chonkiejs/chunk/-/chunk-0.5.0.tgz","fileCount":3,"integrity":"sha512-jf9i0hh/M1Zex42/ZWLiSkLruEoPi5hX2feKXv8kcTK2nmrliveBNq5Wt4ynfoftMVFa/BhehpE2Au0GiuMbQA==","signatures":[{"sig":"MEYCIQDPn8KIKxX8639xRYAhideuhSI2eMd7rzzDmd0Hgu3m5gIhAOYWmXM8+IIqsfZhry57JYSeui424W0h7R3GfrKp7ta3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@chonkiejs%2fchunk@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":11308},"main":"index.js","type":"module","gitHead":"811b921726dacbc85de6a6de5562cb78eb14cead","scripts":{"test":"node --test tests/","build":"wasm-pack build --target web"},"_npmUser":{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"},"repository":{"url":"git+https://github.com/chonkie-inc/chunk.git","type":"git"},"_npmVersion":"10.8.2","description":"The fastest semantic text chunking library","directories":{},"_nodeVersion":"20.19.6","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/chunk_0.5.0_1768961272715_0.4939364463229985","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@chonkiejs/chunk","version":"0.6.0","keywords":["chunking","text","simd","nlp","tokenization","rag","wasm","webassembly","chonkie"],"author":{"name":"Bhavnick Minhas"},"license":"MIT OR Apache-2.0","_id":"@chonkiejs/chunk@0.6.0","maintainers":[{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"}],"homepage":"https://github.com/chonkie-inc/chunk#readme","bugs":{"url":"https://github.com/chonkie-inc/chunk/issues"},"dist":{"shasum":"219c05d71d062bc4aae36823a59038d665a4c1cb","tarball":"https://registry.npmjs.org/@chonkiejs/chunk/-/chunk-0.6.0.tgz","fileCount":3,"integrity":"sha512-BPttAsf4saVerR0o0k+uOa7FiTorTqzHLB2Zlc1fEmxm+749iWg4MC2DINxbGcvq5eqDGjKG8u+BPIktHSOYxA==","signatures":[{"sig":"MEYCIQCw1uUKh+6rjAyKoLr2WLy7Cu3cZR7v0hfV+8U1MBLCwwIhAKIEMrEul0M3JpjdTMPcE3J8mOQNDcwX3AeJOLSs/CEH","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@chonkiejs%2fchunk@0.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":13664},"main":"index.js","type":"module","gitHead":"721a66c277ac38e6a30775c841724d64bd1ee841","scripts":{"test":"node --test tests/","build":"wasm-pack build --target web"},"_npmUser":{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"},"repository":{"url":"git+https://github.com/chonkie-inc/chunk.git","type":"git"},"_npmVersion":"10.8.2","description":"The fastest semantic text chunking library","directories":{},"_nodeVersion":"20.19.6","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/chunk_0.6.0_1768967404110_0.2571811972292959","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@chonkiejs/chunk","version":"0.7.0","keywords":["chunking","text","simd","nlp","tokenization","rag","wasm","webassembly","chonkie"],"author":{"name":"Bhavnick Minhas"},"license":"MIT OR Apache-2.0","_id":"@chonkiejs/chunk@0.7.0","maintainers":[{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"}],"homepage":"https://github.com/chonkie-inc/chunk#readme","bugs":{"url":"https://github.com/chonkie-inc/chunk/issues"},"dist":{"shasum":"9a20e43f3a7bc837ee4329935cbb1ca2ab6a1aab","tarball":"https://registry.npmjs.org/@chonkiejs/chunk/-/chunk-0.7.0.tgz","fileCount":3,"integrity":"sha512-PziocGkahdqzwNGwJ7pEp5d+YZ8zALcf20ey7PLaBCjM1/ToQY/6GfVrCZw4Z3LK/O2BqVise+ITZPg5C+4Wqw==","signatures":[{"sig":"MEQCIHN/Kdt9hVWo7That53A2Oa1VoxwP9EEOSl8HvyLp7CfAiBrRZYc1UGGHslDwcJZBan11jY1peNv8X8KZMremUbABA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@chonkiejs%2fchunk@0.7.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":13664},"main":"index.js","type":"module","gitHead":"23ed00bc939eb5e0e1a14b9a66afd0710060cbdc","scripts":{"test":"node --test tests/","build":"wasm-pack build --target web"},"_npmUser":{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"},"repository":{"url":"git+https://github.com/chonkie-inc/chunk.git","type":"git"},"_npmVersion":"10.8.2","description":"The fastest semantic text chunking library","directories":{},"_nodeVersion":"20.19.6","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/chunk_0.7.0_1768968158435_0.8224895857181651","host":"s3://npm-registry-packages-npm-production"}},"0.8.0":{"name":"@chonkiejs/chunk","version":"0.8.0","keywords":["chunking","text","simd","nlp","tokenization","rag","wasm","webassembly","chonkie"],"author":{"name":"Bhavnick Minhas"},"license":"MIT OR Apache-2.0","_id":"@chonkiejs/chunk@0.8.0","maintainers":[{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"}],"homepage":"https://github.com/chonkie-inc/chunk#readme","bugs":{"url":"https://github.com/chonkie-inc/chunk/issues"},"dist":{"shasum":"57f9543e10924c7387460ce45489c7752fd29bf3","tarball":"https://registry.npmjs.org/@chonkiejs/chunk/-/chunk-0.8.0.tgz","fileCount":3,"integrity":"sha512-P4vrgkiPCiAt/bc1j9mua/YKU2rVbZocDCK02dE4vEDomHTRQhm7OrUZC70B4vdw/S8RxYNiIMNesfNqMmMhnQ==","signatures":[{"sig":"MEUCIQC9dDJ3ZZRdXUIjP5jWoPvzT5uK9JXL9EV42djsaxUR8gIgEX4YyZT3Wpx47b3Qqp0YRGLY1v8yfi4Giw6k70UcE4w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@chonkiejs%2fchunk@0.8.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":15039},"main":"index.js","type":"module","gitHead":"515a843ffd08e5a515d7d99a2ee9ba23db3e5400","scripts":{"test":"node --test tests/","build":"wasm-pack build --target web"},"_npmUser":{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"},"repository":{"url":"git+https://github.com/chonkie-inc/chunk.git","type":"git"},"_npmVersion":"10.8.2","description":"The fastest semantic text chunking library","directories":{},"_nodeVersion":"20.19.6","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/chunk_0.8.0_1768970459105_0.7060758795216928","host":"s3://npm-registry-packages-npm-production"}},"0.9.0":{"name":"@chonkiejs/chunk","version":"0.9.0","keywords":["chunking","text","simd","nlp","tokenization","rag","wasm","webassembly","chonkie"],"author":{"name":"Bhavnick Minhas"},"license":"MIT OR Apache-2.0","_id":"@chonkiejs/chunk@0.9.0","maintainers":[{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"}],"homepage":"https://github.com/chonkie-inc/chunk#readme","bugs":{"url":"https://github.com/chonkie-inc/chunk/issues"},"dist":{"shasum":"8df715c94484a816afbc6b862cec8dc9b3f64149","tarball":"https://registry.npmjs.org/@chonkiejs/chunk/-/chunk-0.9.0.tgz","fileCount":3,"integrity":"sha512-oip0XYIY9DhDSrWMFVEhjZ1czlsq97Ur25NCgrrFNQtkf99UV8zySOv/jHLEch6lRT+ZpfUMIjU7Eqdn2zLavw==","signatures":[{"sig":"MEYCIQCqe+pvkjceGtuIJaMQxD5us0Y997OAKCFYUkZvp8Gh9wIhAKEnhxfYbftzPjzfjLZeH7qj/LO4Dq6PT6BpYEE2yNge","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@chonkiejs%2fchunk@0.9.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":15039},"main":"index.js","type":"module","gitHead":"64d4afd168ff6d526af91b2a5dff5cef85e03e8b","scripts":{"test":"node --test tests/","build":"wasm-pack build --target web"},"_npmUser":{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"},"repository":{"url":"git+https://github.com/chonkie-inc/chunk.git","type":"git"},"_npmVersion":"10.8.2","description":"The fastest semantic text chunking library","directories":{},"_nodeVersion":"20.19.6","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/chunk_0.9.0_1768981802626_0.3757733081814403","host":"s3://npm-registry-packages-npm-production"}},"0.9.1":{"name":"@chonkiejs/chunk","version":"0.9.1","keywords":["chunking","text","simd","nlp","tokenization","rag","wasm","webassembly","chonkie"],"author":{"name":"Bhavnick Minhas"},"license":"MIT OR Apache-2.0","_id":"@chonkiejs/chunk@0.9.1","maintainers":[{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"}],"homepage":"https://github.com/chonkie-inc/chunk#readme","bugs":{"url":"https://github.com/chonkie-inc/chunk/issues"},"dist":{"shasum":"a3a22085bcaf9921a33f80e0f8e4e9139e003a27","tarball":"https://registry.npmjs.org/@chonkiejs/chunk/-/chunk-0.9.1.tgz","fileCount":9,"integrity":"sha512-MMQLF6/xzRj5TAoHmf31fYOzpNo0o0+u3HXFssm7xzW2y7LJxwHzbU70HIlNwJmMzrnYvo0uAiHSeLDGmZtK/A==","signatures":[{"sig":"MEUCIHYiCygEPSuvEcxdG5CbSKXCu63z0uET3PhR41wVjAe3AiEArEWYIoRtTIXb9sd3O0kVVG40uyO4izPghBvtAFgCLYI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@chonkiejs%2fchunk@0.9.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":92573},"main":"index.js","type":"module","gitHead":"41089a41a8a267b4ba0add43fdd60bc7b7af8eb6","scripts":{"test":"node --test tests/","build":"wasm-pack build --target web"},"_npmUser":{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"},"repository":{"url":"git+https://github.com/chonkie-inc/chunk.git","type":"git"},"_npmVersion":"10.8.2","description":"The fastest semantic text chunking library","directories":{},"_nodeVersion":"20.19.6","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/chunk_0.9.1_1768986113206_0.44747072119880227","host":"s3://npm-registry-packages-npm-production"}},"0.9.2":{"name":"@chonkiejs/chunk","version":"0.9.2","keywords":["chunking","text","simd","nlp","tokenization","rag","wasm","webassembly","chonkie"],"author":{"name":"Bhavnick Minhas"},"license":"MIT OR Apache-2.0","_id":"@chonkiejs/chunk@0.9.2","maintainers":[{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"}],"homepage":"https://github.com/chonkie-inc/chunk#readme","bugs":{"url":"https://github.com/chonkie-inc/chunk/issues"},"dist":{"shasum":"e16299314f166fbd6365aa2d0fbf77ee1cae9695","tarball":"https://registry.npmjs.org/@chonkiejs/chunk/-/chunk-0.9.2.tgz","fileCount":9,"integrity":"sha512-J219DTswE3oQyBKSBsg7P7KZqZLTNKgEEgMljjFcGca24GCP7teqJxdkrtcK4+IbdYBZJCeeMNyvXtnVPikS8Q==","signatures":[{"sig":"MEUCIQCzNGSG2bzoIjWoIxUr41dHfzIorH748bdICxOHyqaotAIgafaK3vvLcX6DjoeAzKdM2HyUbyzpgpoUmRxSP4IL6LI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@chonkiejs%2fchunk@0.9.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":95938},"main":"index.js","type":"module","gitHead":"3ad559faf7015910602adf1405ae4659ea6174a7","scripts":{"test":"node --test tests/","build":"wasm-pack build --target web"},"_npmUser":{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"},"repository":{"url":"git+https://github.com/chonkie-inc/chunk.git","type":"git"},"_npmVersion":"10.8.2","description":"The fastest semantic text chunking library","directories":{},"_nodeVersion":"20.19.6","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/chunk_0.9.2_1768986405847_0.576531728516565","host":"s3://npm-registry-packages-npm-production"}},"0.9.3":{"name":"@chonkiejs/chunk","version":"0.9.3","keywords":["chunking","text","simd","nlp","tokenization","rag","wasm","webassembly","chonkie"],"author":{"name":"Bhavnick Minhas"},"license":"MIT OR Apache-2.0","_id":"@chonkiejs/chunk@0.9.3","maintainers":[{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"}],"homepage":"https://github.com/chonkie-inc/chunk#readme","bugs":{"url":"https://github.com/chonkie-inc/chunk/issues"},"dist":{"shasum":"e562427f1bcdbd5c89a5c2edcd5ce2c64f6ca5c2","tarball":"https://registry.npmjs.org/@chonkiejs/chunk/-/chunk-0.9.3.tgz","fileCount":9,"integrity":"sha512-uUOeoFGY3s6kzAoKskI50weZN0zvW3oLwUijA1uX7Wxuy9yZStF2IvGuXRigMgP2g/L85lsotYGkjpBMLjQnrg==","signatures":[{"sig":"MEQCICMuwUTYvJ7ivp4pdxQxJe7UIc4fnTjEP2ArZ9mAFGQwAiAiAtU+U3t5CpDkENT3Y7ZULCi2Oh6cj5k0Yw41MUKDqg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@chonkiejs%2fchunk@0.9.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":96872},"main":"index.js","type":"module","gitHead":"c393e4fb9b308bb73a9f8a2d990a52c933b88e40","scripts":{"test":"node --test tests/","build":"wasm-pack build --target web"},"_npmUser":{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"},"repository":{"url":"git+https://github.com/chonkie-inc/chunk.git","type":"git"},"_npmVersion":"10.8.2","description":"The fastest semantic text chunking library","directories":{},"_nodeVersion":"20.19.6","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/chunk_0.9.3_1768986958870_0.8518068646704064","host":"s3://npm-registry-packages-npm-production"}},"0.10.0":{"name":"@chonkiejs/chunk","version":"0.10.0","keywords":["chunking","text","simd","nlp","tokenization","rag","wasm","webassembly","chonkie"],"author":{"name":"Bhavnick Minhas"},"license":"MIT OR Apache-2.0","_id":"@chonkiejs/chunk@0.10.0","maintainers":[{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"}],"homepage":"https://github.com/chonkie-inc/chunk#readme","bugs":{"url":"https://github.com/chonkie-inc/chunk/issues"},"dist":{"shasum":"00d22a86d9a40693f19cb95665ccaa16fbac57ae","tarball":"https://registry.npmjs.org/@chonkiejs/chunk/-/chunk-0.10.0.tgz","fileCount":9,"integrity":"sha512-VBBLxlAld0arThAjp2A+Nb+dnW1gcrPO/YDxpokNodCXK0/ijftsA3K1xNstOWA6M2PskRIA+9PAAWmhu1SXqQ==","signatures":[{"sig":"MEUCIAIlMybhepNslkFtyYAynMZUHZNBUsHVM+Y2otUlcQagAiEAubTy9Mmf75IGe1gjofwWjNaohmfiOmGcQ2zo5PEcQc0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":100630},"main":"index.js","type":"module","gitHead":"15b3a12d8891e54dffadba706febbcfc588d7c6d","scripts":{"test":"node --test tests/","build":"wasm-pack build --target web"},"_npmUser":{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"},"repository":{"url":"git+https://github.com/chonkie-inc/chunk.git","type":"git"},"_npmVersion":"11.12.0","description":"The fastest semantic text chunking library","directories":{},"_nodeVersion":"23.3.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/chunk_0.10.0_1774837585234_0.3454990730421581","host":"s3://npm-registry-packages-npm-production"}},"0.10.1":{"name":"@chonkiejs/chunk","version":"0.10.1","keywords":["chunking","text","simd","nlp","tokenization","rag","wasm","webassembly","chonkie"],"author":{"name":"Bhavnick Minhas"},"license":"MIT OR Apache-2.0","_id":"@chonkiejs/chunk@0.10.1","maintainers":[{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"}],"homepage":"https://github.com/chonkie-inc/chunk#readme","bugs":{"url":"https://github.com/chonkie-inc/chunk/issues"},"dist":{"shasum":"45b92dc8b7b66a926ed5cbd156581de08984fcf1","tarball":"https://registry.npmjs.org/@chonkiejs/chunk/-/chunk-0.10.1.tgz","fileCount":9,"integrity":"sha512-/CidKLPYUP1NQSdcw8y5SOknzd7OmLHeaWBhdEcJPEhMvGSnn7Jwa4Zi1KoHx4V6pqBHaYHE3YCjQ3UYFyu+Zw==","signatures":[{"sig":"MEUCIC6GCozJqii4uDwv5JnKt2H1udgImgdX5WILRq+wfETtAiEA+l8+BBvav0lpapWmq978jXM70R1X9c+Bh4/Ip3SI73E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":120876},"main":"index.js","type":"module","gitHead":"6ae88c4e135c9d6ded1ab2719f0e6236e0e0fa43","scripts":{"test":"node --test tests/","build":"wasm-pack build --target web"},"_npmUser":{"name":"bhavnicksm","email":"bhavnicksm@gmail.com"},"repository":{"url":"git+https://github.com/chonkie-inc/chunk.git","type":"git"},"_npmVersion":"11.12.0","description":"The fastest semantic text chunking library","directories":{},"_nodeVersion":"23.3.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/chunk_0.10.1_1774856072961_0.4031030556527333","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-01-21T02:07:52.580Z","modified":"2026-05-12T21:03:56.076Z","0.5.0":"2026-01-21T02:07:52.879Z","0.6.0":"2026-01-21T03:50:04.226Z","0.7.0":"2026-01-21T04:02:38.591Z","0.8.0":"2026-01-21T04:40:59.246Z","0.9.0":"2026-01-21T07:50:02.770Z","0.9.1":"2026-01-21T09:01:53.357Z","0.9.2":"2026-01-21T09:06:45.994Z","0.9.3":"2026-01-21T09:15:59.040Z","0.10.0":"2026-03-30T02:26:25.386Z","0.10.1":"2026-03-30T07:34:33.120Z"},"bugs":{"url":"https://github.com/chonkie-inc/chunk/issues"},"author":{"name":"Bhavnick Minhas"},"license":"MIT OR Apache-2.0","homepage":"https://github.com/chonkie-inc/chunk#readme","keywords":["chunking","text","simd","nlp","tokenization","rag","wasm","webassembly","chonkie"],"repository":{"url":"git+https://github.com/chonkie-inc/chunk.git","type":"git"},"description":"The fastest semantic text chunking library","maintainers":[{"email":"lain@chonkie.ai","name":"chonklain"},{"email":"bhavnicksm@gmail.com","name":"bhavnicksm"}],"readme":"<p align=\"center\">\n  <img src=\"../../assets/memchunk_wide.png\" alt=\"@chonkiejs/chunk\" width=\"500\">\n</p>\n\n<h1 align=\"center\">@chonkiejs/chunk</h1>\n\n<p align=\"center\">\n  <em>the fastest text chunking library — up to 1 TB/s throughput</em>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://crates.io/crates/chunk\"><img src=\"https://img.shields.io/crates/v/chunk.svg?color=e74c3c\" alt=\"crates.io\"></a>\n  <a href=\"https://pypi.org/project/chonkie-core\"><img src=\"https://img.shields.io/pypi/v/chonkie-core.svg?color=e67e22\" alt=\"PyPI\"></a>\n  <a href=\"https://www.npmjs.com/package/@chonkiejs/chunk\"><img src=\"https://img.shields.io/npm/v/@chonkiejs/chunk.svg?color=2ecc71\" alt=\"npm\"></a>\n  <a href=\"https://github.com/chonkie-inc/chunk\"><img src=\"https://img.shields.io/badge/github-chunk-3498db\" alt=\"GitHub\"></a>\n  <a href=\"LICENSE-MIT\"><img src=\"https://img.shields.io/badge/license-MIT%2FApache--2.0-9b59b6.svg\" alt=\"License\"></a>\n</p>\n\n---\n\nyou know how every chunking library claims to be fast? yeah, we actually meant it.\n\n**@chonkiejs/chunk** splits text at semantic boundaries (periods, newlines, the usual suspects) and does it stupid fast. we're talking \"chunk the entire english wikipedia in 120ms\" fast.\n\nwant to know how? [read the blog post](https://minha.sh/posts/so,-you-want-to-chunk-really-fast) where we nerd out about SIMD instructions and lookup tables.\n\n## 📦 installation\n\n```bash\nnpm install @chonkiejs/chunk\n```\n\nlooking for [rust](https://github.com/chonkie-inc/chunk) or [python](https://github.com/chonkie-inc/chunk/tree/main/packages/python)?\n\n## 🚀 usage\n\n```javascript\nimport { init, chunk } from '@chonkiejs/chunk';\n\n// initialize wasm (required once)\nawait init();\n\nconst text = \"Hello world. How are you? I'm fine.\\nThanks for asking.\";\n\n// with defaults (4KB chunks, split at \\n . ?)\nfor (const slice of chunk(text)) {\n    console.log(slice);\n}\n\n// with custom size\nfor (const slice of chunk(text, { size: 1024 })) {\n    console.log(slice);\n}\n\n// with custom delimiters\nfor (const slice of chunk(text, { delimiters: \".?!\\n\" })) {\n    console.log(slice);\n}\n\n// with multi-byte pattern (e.g., metaspace ▁ for SentencePiece tokenizers)\nfor (const slice of chunk(text, { pattern: \"▁\", prefix: true })) {\n    console.log(slice);\n}\n\n// with consecutive pattern handling (split at START of runs, not middle)\nfor (const slice of chunk(\"word   next\", { pattern: \" \", consecutive: true })) {\n    console.log(slice);\n}\n\n// with forward fallback (search forward if no pattern in backward window)\nfor (const slice of chunk(text, { pattern: \" \", forwardFallback: true })) {\n    console.log(slice);\n}\n\n// collect all chunks\nconst chunks = [...chunk(text)];\n```\n\npass strings and get strings back. for zero-copy performance with binary data, pass `Uint8Array` and you'll get `Uint8Array` views back.\n\n## 📝 citation\n\nif you use @chonkiejs/chunk in your research, please cite it as follows:\n\n```bibtex\n@software{chunk2025,\n  author = {Minhas, Bhavnick},\n  title = {chunk: The fastest text chunking library},\n  year = {2025},\n  publisher = {GitHub},\n  howpublished = {\\url{https://github.com/chonkie-inc/chunk}},\n}\n```\n\n## 📄 license\n\nlicensed under either of [Apache License, Version 2.0](LICENSE-APACHE) or [MIT license](LICENSE-MIT) at your option.\n","readmeFilename":"README.md"}