I kept rewriting the same array.slice(i, i + n) logic in every project. Eventually, I decided to stop and just make a utility.
Chonkify is a small (~870B), zero-dependency JS/TS library for chunking any kind of data:
- Works with Array, String, Buffer, Set, Map, Array-like, TypedArray
- Handles AsyncIterable (great for batching streams)
- Unicode-safe (correctly handles grapheme clusters, emoji, etc.)
- ESM-first, TypeScript-ready
I mostly made it for myself, but figured others might find it useful too.
Would love feedback!
Comments URL: https://news.ycombinator.com/item?id=44172017
Points: 12
# Comments: 2
Chcete-li přidat komentář, přihlaste se
Ostatní příspěvky v této skupině


Hi HN,
In the past few years I've become more interested in machine learning. Since I'm sure the same is true for many here, I wanted to share this project I've been working on: glowstick uses t
Hey HN! We're Shreyash and Bhavnick. We're building Chonkie (https://chonkie.ai), an open-source library for chunking and embedding data.
Companies building software in the US were hit hard a few years ago when the tax code stopped allowing deduction of software dev expenses. Now they have to be amortized over several years.
HN ha


Article URL: https://www.theguardian.com/books/2025/jun/09/fred