GitShow/sindresorhus/get-east-asian-width
sindresorhus

get-east-asian-width

Determine the East Asian Width of a Unicode character

by sindresorhus
Star on GitHubForknpm

JavaScript

49 stars9 forks4 contributorsActive · 1mo agoSince 2023v1.6.0MIT

Meet the team

See all 4 on GitHub →
sindresorhus
sindresorhus13 contributions
fisker
fisker11 contributions
privatenumber
privatenumber1 contribution
github-actions[bot]Bot
github-actions[bot]1 contribution

Languages

View on GitHub →
JavaScript100%

Commit activity

Last 12 weeks · 2 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
fisker
Improve tree-shakingMergedPR

#14 and https://github.com/sindresorhus/get-east-asian-width/commit/8a1a5efca8c2645c2f8f94f2572461007a3bca2d makes bundler unable to tree-shake unused ranges. This increases the Prettier package ~29kb. Let's simply save the minimal/maximum code point in lookup-data.js? For , we can also save in lookup-data.js, but Prettier need them anyway, I added a notation, so users that don't need them should be able to remove it too.

fisker · 1mo ago
privatenumber
perf: use packed arrays with binary search for lookupsMergedPR

Problem The independent lookup functions in use long boolean chains (179 and 136 conditions for and respectively), which produce a large minified output and require O(n) linear scans. Changes Update to generate flat pair arrays with a shared binary search function for all independent lookup functions Add tests for all 6 East Asian Width categories Bundle size Minified: 5,582 → 4,170 bytes (-25%) Performance O(n) boolean chains → O(log n) binary search. Benchmarked with 10M iterations per test: Ref: https://github.com/sindresorhus/string-width/issues/71

privatenumber · 4mo ago
fisker
Update to Unicode 17.0MergedPR

I don't have write access to this repo, so I ran the action from my fork. https://github.com/fisker/get-east-asian-width/actions/runs/17591909499

fisker · 6mo ago
Structured data for AI agents

Repository: sindresorhus/get-east-asian-width. Description: Determine the East Asian Width of a Unicode character Stars: 49, Forks: 9. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Latest release: v1.6.0 (1mo ago). Open PRs: 0, open issues: 0. Last activity: 1mo ago. Community health: 85%. Top contributors: sindresorhus, fisker, privatenumber, github-actions[bot].

·@ofershap

Replace github.com with gitshow.dev