wcwidth-o1
Version:
Unicode text width calculation (wcwidth/wcswidth) for Node.js and TypeScript, optimized to O(1), based on Markus Kuhn's reference.
12 lines (11 loc) • 420 B
TypeScript
/**
* Bitset accessor for East Asian Ambiguous characters (Unicode 17.0.0).
*
* - Uses `ambiguousMap` for sparse bitset lookups.
* - Returns 0 if a block has no ambiguous characters.
*
* @param idx Codepoint block index (ucs >> 5)
* @returns 32-bit mask of ambiguous characters for this block
*/
export declare const ambiguous: (idx: number) => number;
export declare const ambiguousMap: Record<number, number>;