Show HN: wcwidth-o1 – Find Unicode text cell width in no time for JavaScript/TS

10 dawson0 2 9/13/2025, 2:53:43 AM github.com ↗
I ported Markus Kuhn’s wcwidth to TypeScript and optimized it with bitset lookups for O(1) performance. It now covers the full Unicode 15.1 combining ranges.

GitHub: https://github.com/dawsonhuang0/Wcwidth-O1 NPM: https://www.npmjs.com/package/wcwidth-o1

Feedback welcome!

Comments (2)

jv22222 · 49m ago
I was about to say you could figure this kind of thing out with Intl.Segmenter but then saw it was a different problem. Nice.
peter-m80 · 1h ago
Nice