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ě

Article URL: https://github.com/manaskamal/XenevaOS
Comments URL: https://news.y

Article URL: https://arxiv.org/abs/2506.07638
Comments URL: https://news.ycombinator.c

Article URL: https://www.nature.com/articles/d41586-025-01661-4
We wanted to build a course for new Mastra devs to get started quickly. However, we knew videos would go out of date and be more difficult to maintain.
We decided to launch our "course" as an MC

I made this 130 mile capable VTOL drone in only 90 days. It can fly for 3 hours on a single charge. That would make it one of the longest range and endurance 3D printed VTOLs in the world.
This