Show HN: wcwidth-o1 – Find Unicode text cell width in no time for JavaScript/TS
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: import wcwidth from 'wcwidth-o1' ; const example1 = wcwidth ( 'a' ) ; // 1 const example2 = wcwidth ( '好' ) ; // 2 const example3 = wcwidth ( '😊' ) ; // 2 or i