{"library":"mdast-util-phrasing","title":"mdast Phrasing Content Utility","description":"mdast-util-phrasing is a specialized utility within the unified (syntax-tree) ecosystem designed to accurately identify if a given mdast (Markdown Abstract Syntax Tree) node constitutes \"phrasing content.\" This includes elements like text, emphasis, strong, links, and code spans, but notably excludes `html` nodes due to their dual nature as both phrasing and flow content. The package is currently stable at version 4.1.0 and is actively maintained by the unified collective, with major releases typically aligning with Node.js LTS version updates or significant architectural shifts, such as the transition to ESM-only in version 3.0.0. Its core functionality relies on `unist-util-is` for robust node testing, making it a foundational tool for building other mdast utilities that need to differentiate between inline and block-level content in Markdown.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install mdast-util-phrasing"],"cli":null},"imports":["import { phrasing } from 'mdast-util-phrasing'","import { phrasing } from 'mdast-util-phrasing'","import type { Node } from 'mdast'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { phrasing } from 'mdast-util-phrasing';\nimport { paragraph, strong, text } from 'mdast-builder';\n\n// Example 1: A paragraph is not phrasing content\nconst paragraphNode = paragraph([text('Alpha')]);\nconsole.log(`Is paragraph node phrasing content? ${phrasing(paragraphNode)}`);\n\n// Example 2: A strong node (inline) is phrasing content\nconst strongNode = strong([text('Delta')]);\nconsole.log(`Is strong node phrasing content? ${phrasing(strongNode)}`);\n\n// Example 3: An HTML node is explicitly excluded and returns false\nconst htmlNode = { type: 'html', value: '<span>Hello</span>' };\nconsole.log(`Is HTML node phrasing content? ${phrasing(htmlNode)}`);\n\n// Output:\n// Is paragraph node phrasing content? false\n// Is strong node phrasing content? true\n// Is HTML node phrasing content? false","lang":"typescript","description":"Demonstrates how to import and use the `phrasing` function to determine if an mdast node is phrasing content, showing examples for paragraph, strong, and HTML nodes.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}