micromark-util-symbol is a core utility package within the unified collective's `micromark` ecosystem, specifically designed to provide a consistent set of constants. These constants include character codes, common character values, internal token types, and general numeric constants, all crucial for developers building extensions for `micromark`. As of version 2.0.1, the package maintains compatibility with Node.js 16+ and `micromark@3`. While individual utility packages within `micromark` don't adhere to a strict, predictable release cadence, the broader `micromark` project sees regular updates. This package's key differentiator is its provision of named constants that `micromark-build` compiles away for production, encouraging safer, more readable development code without incurring runtime overhead in optimized builds.
npm install micromark-util-symbolVerified import paths — ran on the pinned version, not inferred.
Demonstrates importing and using the `codes`, `constants`, `types`, and `values` objects to access common Markdown-related symbols and internal types.
Ensure your project is configured for ESM, or use dynamic `import()` for CJS projects.
Upgrade your Node.js environment to version 16 or newer to ensure compatibility.
Always check the compatibility matrix between `micromark` core and its utilities. Ensure `micromark@3` is installed if using `micromark-util-symbol@2`.
Be aware that optimized builds might strip these constants. For debugging, inspect source maps or run in a development environment without `micromark-build` optimizations.
Ensure your `package.json` has `"type": "module"` or change the file extension to `.mjs`. If using Node.js, ensure your environment supports ESM.
Replace `require()` calls with `import` statements for `micromark-util-symbol`.
Ensure you are using named imports: `import { codes } from 'micromark-util-symbol'`.Upgrade your Node.js installation to version 16 or a later supported version.
No dependency data recorded yet.