frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: Ultra-lightweight chunker library with emoji support

https://github.com/ushakov-igor/chonkify
19•Beardier•2d ago
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

gavmor•1d ago
No src/, only a minified index.js dist?
Beardier•1d ago
I did it primarily for my needs. But the idea is good, I'll add it today!
Beardier•1d ago
Added if you're interested :)
happytoexplain•1d ago
Cool! One thought:

>Correctly handles Unicode emoji and complex symbols

I'm no JS/TS expert, but this sounds like it could be a case of making something behave like an inexperienced dev would expect at the cost of making it behave unexpectedly to an experienced dev.

JS strings are sequences of UTF16 code points, and that's part of their public API (e.g. 'split'), right? That's JS's choice (or mistake, depending on your feelings). So I would expect 'chonk' to treat strings as what they are. And then add a flag or separate method ('chonkGraphemes') instead.

But maybe this kind of "helpfulness" is normal in 3rd party JS APIs?

Beardier•1d ago
Hi! Great idea — overall, all the edge cases are handled really well. That said, I think it would be good to add a config for the available processing options (similar to how it’s done in markdown-it, for example) to better support expected behavior. I’ll give it some thought and work on implementing it!
Beardier•1d ago
Thanks for your support! Added separate processing, now it seems the behavior is more obvious
q3k•1d ago
See, this is what I don't get about the JS/NPM ecosystem.

This is 140 lines of code, with comments. Yet it gets a whole separate repository, with a cute name, fancy README, little emoji graphics and a bespoke logo. All of this for functionality that other languages have in their stdlib.

It's almost like it's more of an exercise in marketing than an attempt to actually make a useful library.

Beardier•1d ago
Yeah, that’s just how the JS ecosystem works — even small utilities often get published as separate packages so they can be reused without copy-pasting. I originally built this for myself, and figured it might be useful to others too.

As for the name and README — I don’t really see it as marketing. I just prefer to make things clear and easy to use for anyone who stumbles across it. Even if it’s a small project, why not present it properly?

If that comes off as overkill, fair enough. I’d rather overdeliver than leave people guessing.

Show HN: I made a 3D SVG Renderer that projects textures without rasterization

https://seve.blog/p/i-made-a-3d-svg-renderer-that-projects
181•seveibar•14h ago•55 comments

Show HN: GPT image editing, but for 3D models

https://www.adamcad.com/
155•zachdive•1d ago•75 comments

Show HN: I built Claude code but for image generation

https://agent.trybezel.com/
3•palashshah•3h ago•0 comments

Show HN: The first portable, customisable General AI Agent – available for free

https://www.orkestralai.com
4•saccodd•4h ago•1 comments

Show HN: App.build, an open-source AI agent that builds full-stack apps

https://www.app.build/
85•davidgomes•21h ago•13 comments

Show HN: Open a browser by clapping twice (inspired by Iron Man)

https://github.com/Yutarop/two_claps_open
4•ponta17•7h ago•0 comments

Show HN: MailShrimp – validate email lists with risk level and confidence score

https://www.mailshrimp.app
2•udiocla•7h ago•5 comments

Show HN: Verysmall.site – vibecode single page websites

https://verysmall.site
26•sixhobbits•1d ago•14 comments

Show HN: Heynds – Write Faster – AI Voice and Writing Assistant (Mac/Windows)

https://www.heynds.com/en
3•pierremouchan•8h ago•0 comments

Show HN: Controlling 3D models with voice and hand gestures

https://github.com/collidingScopes/3d-model-playground
97•getToTheChopin•2d ago•20 comments

Show HN: I wrote a Java decompiler in pure C language

https://github.com/neocanable/garlic
165•neocanable•2d ago•94 comments

Show HN: Localize React apps without rewriting code

https://github.com/lingodotdev/lingo.dev
87•maxpr•1d ago•70 comments

Show HN: I build one absurd web project every month

https://absurd.website
285•absurdwebsite•2d ago•66 comments

Show HN: I built an old photo restoration tool using the Flux Kontext

https://restoreoldphotos.io
14•cyberplaid•11h ago•8 comments

Show HN: Tiptap AI Agent – Add AI workflows to your text editor in minutes

43•philipisik•1d ago•17 comments

Show HN: Clarity – A Dashboard for Scrum Teams (Early Access)

https://clarity.hacknscrum.de/
2•xsimonx•11h ago•0 comments

Show HN: Gradle plugin for faster Java compiles

https://github.com/elide-dev/gradle
36•sgammon•1d ago•33 comments

Show HN: This Hacker News does not exist

https://thishackernewsdoesnotexist.com
27•wonderfuly•1d ago•15 comments

Show HN: Kan.bn – An open-source alterative to Trello

https://github.com/kanbn/kan
498•henryball•3d ago•217 comments

Show HN: AirAP AirPlay server – AirPlay to an iOS Device

https://github.com/neon443/AirAP
201•neon443•1d ago•37 comments

Show HN: Ephe – A minimalist open-source Markdown paper for today

https://github.com/unvalley/ephe
136•unvalley•1d ago•53 comments

Show HN: An Alfred workflow to open GCP services and browse resources within

https://github.com/dineshgowda24/alfred-gcp-workflow
54•dineshgowda24•1d ago•16 comments

Show HN: Onlook – Open-source, visual-first Cursor for designers

https://github.com/onlook-dev/onlook
407•hoakiet98•1w ago•81 comments

Show HN: Mosaique.info – Global news in context (solo dev, no ads, no tracking)

https://www.mosaique.info
28•msqinfo•1d ago•9 comments

Show HN: A toy version of Wireshark (student project)

https://github.com/lixiasky/vanta
261•lixiasky•3d ago•72 comments

Show HN: Patio – Rent tools, learn DIY, reduce waste

https://patio.so
250•GouacheApp•4d ago•162 comments

Show HN: I built an OSINT tools directory

https://r00m101.com/tools
49•r00m101•1d ago•15 comments

Show HN: Moon Phase Algorithms for C, Lua, Awk, JavaScript, etc.

https://github.com/oliverkwebb/moonphase
70•oliverkwebb•3d ago•16 comments

Show HN: Triage.flow – Chat with Any GitHub Repo Using Faiss and LlamaIndex

https://github.com/ashikshafi08/triage.flow
2•ashikshaffi0•18h ago•0 comments

Show HN: LLMFeeder – Browser extension to extract clean content for LLM context

https://github.com/jatinkrmalik/LLMFeeder
20•jatinkrmalik•1d ago•4 comments