{"library":"micromark-util-symbol","title":"micromark Symbol Utilities","description":"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.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install micromark-util-symbol"],"cli":null},"imports":["import { codes } from 'micromark-util-symbol'","import { constants } from 'micromark-util-symbol'","import { types } from 'micromark-util-symbol'","import * as symbol from 'micromark-util-symbol'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { codes, constants, types, values } from 'micromark-util-symbol';\n\n// Demonstrate various character codes\nconsole.log('Character codes:');\nconsole.log(`  At sign (@): ${codes.atSign}`); // Expected: 64\nconsole.log(`  Line feed (\\n): ${codes.lineFeed}`); // Expected: 10\nconsole.log(`  Space ( ): ${codes.space}`); // Expected: 32\nconsole.log(`  Exclamation mark (!): ${codes.exclamationMark}`); // Expected: 33\n\n// Demonstrate constants related to Markdown parsing limits or specifics\nconsole.log('\\nParsing constants:');\nconsole.log(`  Max character reference named size: ${constants.characterReferenceNamedSizeMax}`); // Expected: 31\nconsole.log(`  Max auto-link scheme size: ${constants.autoLinkSchemeSizeMax}`); // Expected: 32\n\n// Demonstrate internal token types used by micromark's state machine\nconsole.log('\\nMicromark internal types:');\nconsole.log(`  Definition destination raw: '${types.definitionDestinationRaw}'`); // Expected: 'definitionDestinationRaw'\nconsole.log(`  Image reference: '${types.imageReference}'`); // Expected: 'imageReference'\n\n// Demonstrate common character string values\nconsole.log('\\nCharacter values:');\nconsole.log(`  At sign value: '${values.atSign}'`); // Expected: '@'\nconsole.log(`  Tab value: '${values.tab}'`); // Expected: '\\t'\nconsole.log(`  Space value: '${values.space}'`); // Expected: ' '\n\n// This utility package provides a centralized and typed way to refer to\n// fundamental symbols, making it essential for robust micromark extension development.\n","lang":"typescript","description":"Demonstrates importing and using the `codes`, `constants`, `types`, and `values` objects to access common Markdown-related symbols and internal types.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}