{"library":"mdast-comment-marker","title":"mdast Comment Marker Parser","description":"mdast-comment-marker is a utility for parsing structured markers from comments within an mdast (Markdown Abstract Syntax Tree) document. It's currently at version 3.0.0 and follows a release cadence tied to major ecosystem updates like Node.js versions and mdast/MDX specifications. This package differentiates itself by providing a robust way to extract 'processing instructions' or metadata embedded in HTML or MDX comments, such as `<!-- lint disable -->` or `/* zone foo */`. It handles various parameter types including booleans, numbers, and strings, making it suitable for tools like remark-lint or mdast-zone, which utilize these markers for configuration or content manipulation. It is ESM-only and requires Node.js 16 or later.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install mdast-comment-marker"],"cli":null},"imports":["import { commentMarker } from 'mdast-comment-marker'","import type { Marker } from 'mdast-comment-marker'","import type { MarkerParameters } from 'mdast-comment-marker'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { commentMarker } from 'mdast-comment-marker';\n\n// Example 1: Basic HTML comment marker\nconsole.log(commentMarker({ type: 'html', value: '<!--foo-->' }));\n\n// Example 2: HTML comment marker with various parameters\nconsole.log(commentMarker({\n  type: 'html',\n  value: '<!--foo bar baz=12.4 qux=\"test test\" quux=\\'false\\'-->'\n}));\n\n// Example 3: MDX Flow Expression comment marker\nconsole.log(commentMarker({\n  type: 'mdxFlowExpression',\n  value: '/* lint disable heading-style */'\n}));\n\n// Example 4: A comment that does not parse as a marker\nconsole.log(commentMarker({ type: 'html', value: '<!doctype html>' }));","lang":"typescript","description":"This quickstart demonstrates how to use `commentMarker` to parse different types of comment nodes (HTML and MDX) into structured marker objects, including handling various parameter types.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}