Map of named character references (HTML entity names to characters). Version 2.0.2, ESM-only, fully typed with TypeScript. Minimal zero-dependency package for use in HTML parsers, minifiers, or entity handling. Provides a case-sensitive mapping of all HTML5 named character references as a plain object. Differentiators: lightweight, tree-shakeable, maintained as part of the unified ecosystem.
npm install character-entitiesNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates importing and using the named export to look up HTML entity names. Note that the keys are entity names without the leading ampersand or trailing semicolon.
Use dynamic import() or upgrade to an ESM-compatible environment. For Node.js, set 'type': 'module' in package.json or use .mjs extension.
Use the exact casing as specified in the HTML5 spec. Refer to the object keys for correct casing.
Use `import { characterEntities } from 'character-entities'` or run in an ESM context.In tsconfig.json, set `"moduleResolution": "node"` (or `"nodenext"`) and `"esModuleInterop": true`.
No dependency data recorded yet.