Skip to content

Releases: alexszczurek/typehug

Typehug 0.2.0

Choose a tag to compare

@alexszczurek alexszczurek released this 10 Sep 14:46

Typehug 0.2.0 adds explanations for the changes its English and Polish profiles make.

  • Use analyze to get corrected text and actual edits, with original UTF-16 ranges and every active supporting rule family.
  • Use ruleDescriptions, AnalysisResult, and TextChange to build your own explanation interface.
  • Try the updated playground with rule controls, before-and-after previews, and copyable examples matching your text and settings.

Existing glue, HTML, and formatted-run correction behavior is preserved. Change analysis accepts plain text.

npm install @typehug/en@0.2.0
# or @typehug/pl@0.2.0, @typehug/all@0.2.0

Try Typehug · API reference

Validation: 73 tests, TypeScript checks, isolated package installation checks, and CI on Node.js 22 and 24.

Typehug 0.1.0

Choose a tag to compare

@alexszczurek alexszczurek released this 09 Sep 16:02

Typehug's first public release adds nonbreaking spaces to Polish and English text, HTML fragments, and formatted text runs.

Install one language or both:

npm install @typehug/pl
# Or: npm install @typehug/en
# Or: npm install @typehug/all

The packages provide ESM and TypeScript declarations. All five rule families are enabled by default: short words, numbers with units, consecutive initials, selected abbreviations and references, and short paragraph endings. English short-word joins and paragraph endings are editorial preferences.

The HTML adapter has a separate /html import. Text-only bundles exclude its parser. Formatted runs preserve metadata and support protected fragments and paragraph boundaries.

See the README, API, and rules and sources.