Svelte Hacker News logo
  • top
  • new
  • show
  • ask
  • jobs
  • about

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

github.com

7 points by dawson0 3 hours ago

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!

peter-m80 an hour ago

Nice