A map of named character references from HTML 4 (e.g., & → &, < → <) to their corresponding characters. Current stable version is 2.1.0. This package is ESM-only, fully typed with TypeScript, and has zero dependencies. It provides a case-sensitive mapping of 252 named entities as per the HTML 4 specification. Unlike the larger 'character-entities' package, this one only includes HTML 4 entities and excludes HTML 5 additions.
npm install character-entities-html4No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates importing and using the entity map, including case sensitivity and a simple decode function.
Use import syntax (ESM) or switch to CommonJS-compatible version 1.x.
Use characterEntitiesHtml4.apos !== undefined check before using it.
Always match the exact case as defined in HTML 4.
Use import instead: import { characterEntitiesHtml4 } from 'character-entities-html4'Access entities directly: characterEntitiesHtml4.AElig
Update Node.js to >=12.20 or use dynamic import() or use v1.x.
No dependency data recorded yet.