Tech News
← Back to articles

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

read original related products more articles

A TypeScript/JavaScript port of Markus Kuhn’s wcwidth and wcswidth implementations, optimized to O(1).

These functions are defined in IEEE Std 1003.1 (POSIX).

Superior Performance

⚡️ Instant O(1) lookup time

🌏 Full Unicode 15.1 coverage

Getting Started

Install Wcwidth-O1 via npm:

npm i wcwidth-o1

Usage

JavaScript / TypeScript:

... continue reading