Back to Explore

sindresorhus/get-east-asian-width

GitHub
1 updates · last 90 days1 watchersOpen source

Last release: 1 month ago

Provides functions to determine the East Asian Width category and numeric width (1 or 2) for a Unicode character code point. Useful for text layout and alignment in East Asian typography, with an option to treat “ambiguous” characters as wide.

Project status

  • Actively maintained, with a recent upstream push (2026-05-08) and multiple versioned updates since 2025-09.
  • Apparent update cadence, roughly 3 to 4 months between v1.4.0 (2025-09-09), v1.5.0 (2026-02-18), and v1.6.0 (2026-05-08).

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v1.6.0

    1 month ago

    v1.6.0 is intended to improve tree-shaking. The change set focuses on the generated lookup data module and how `lookup.js` imports it, adding explicit min and max code point exports per width category and switching lookup logic to use those constants.

  • v1.5.0

    3 months ago

    v1.5.0 is primarily a performance-oriented release. The release notes only mention performance improvements, but the code diff shows a larger internal refactor around how Unicode East Asian Width ranges are represented and queried.

  • v1.4.0

    9 months ago

    v1.4.0 updates the East Asian Width data used by get-east-asian-width to Unicode 17.0. The implementation changes primarily reflect regenerated wide-character ranges, so the reported width may differ for some code points compared to v1.3.1.

    Breaking
  • v1.3.1

    9 months ago

    Release v1.3.1 contains a small internal refactor. The only substantive code change is in index.js, where helper exports were modified.

    Breaking
  • v1.3.0

    10/13/2024

    v1.3.0 updates the Unicode East Asian Width data to Unicode 16.0 and regenerates the lookup logic accordingly. The release notes only mention the Unicode data update, but the diff also shows additional packaging and repository maintenance changes.

    Breaking
  • v1.2.0

    10/29/2023

    Release v1.2.0 focuses on improving tree shaking by restructuring how Unicode East Asian width categories are determined. The implementation splits the previous monolithic lookup into independent predicate functions and updates the public width APIs to use these predicates.

  • v1.1.0

    10/29/2023

    v1.1.0 primarily reduces package size by changing how the generated East Asian Width lookup table is produced and consumed. The release notes only call out the size reduction, with no mention of any behavioral contract changes in internal modules.

  • v1.0.0

    10/28/2023

    Release v1.0.0 was published on 2023-10-28, but the provided release notes contain no descriptive changelog content (only an emoji). As a result, there is not enough information to identify new features, fixes, breaking changes, or required migrations from the release notes alone.