micromark-util-decode-numeric-character-reference is a focused utility within the micromark ecosystem designed to safely decode numeric character references found in markdown (e.g., `A` for 'A'). The current stable major version is `2.x.x`, with `2.0.2` being the latest patch. As part of the unified collective, it follows a regular release cadence, often aligned with broader micromark updates. A key differentiator is its robust handling of non-characters and control characters, ensuring safe output by replacing them with the Unicode replacement character. This package is ESM-only and ships with full TypeScript type definitions, making it suitable for modern JavaScript and TypeScript environments, and is compatible with Node.js 16+.
npm install micromark-util-decode-numeric-character-referenceVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to decode various numeric character references, including ASCII, control characters, and out-of-range Unicode points, showcasing the utility's safe decoding behavior.
Migrate your project to ES modules (`import`/`export`) or use a tool like `esm` for CommonJS environments if absolutely necessary. Ensure your `package.json` includes `"type": "module"` if using `.js` files with ESM.
Upgrade your Node.js environment to version 16 or newer to ensure compatibility.
Ensure your `micromark` core package is at version `3.x.x` to guarantee full compatibility and expected behavior.
Change your import statement to `import { decodeNumericCharacterReference } from 'micromark-util-decode-numeric-character-reference';` and ensure your environment supports ES modules (e.g., `"type": "module"` in `package.json`).If using ESM, ensure `import { decodeNumericCharacterReference } from '...'`. If you are stuck with CommonJS, you cannot directly import named exports this way for an ESM package; you must refactor to ESM.No dependency data recorded yet.