This package is a focused utility from the unified collective, designed to determine if a given HAST (Hypertext Abstract Syntax Tree) node represents "embedded content" according to the HTML specification. Currently at stable version 3.0.0, it follows the unified ecosystem's release cadence, often aligning major releases with Node.js LTS updates or significant ecosystem shifts like ESM adoption. Its key differentiator is its precise adherence to the HTML specification for embedded content, providing a reliable, small-footprint function (`embedded`) for tree traversal and manipulation tasks where identifying specific HTML element categories is crucial. It is highly specialized, differentiating it from more general element checking utilities like `hast-util-is-element` by focusing solely on the HTML definition of embedded content (e.g., `audio`, `video`, `img`, `iframe`, `svg`). This makes it ideal for specific content processing pipelines within the `unified` ecosystem.
npm install hast-util-embeddedVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to use the `embedded` utility to check if various HAST nodes represent embedded HTML content, printing the boolean result.
Update all module imports to use ES Modules syntax: `import { embedded } from 'hast-util-embedded'`.Upgrade your Node.js environment to version 16 or later to ensure compatibility.
Ensure your build tooling (e.g., webpack, Rollup) and Node.js environment are up-to-date and correctly configured for `package.json` `exports` resolution.
Confirm that the HTML element you are checking falls under the specification's definition of 'embedded content'. For general element checking or other HTML categories, use appropriate dedicated utilities.
Update your import statement to use ES Modules syntax: `import { embedded } from 'hast-util-embedded'`.Ensure you are importing directly from the package name (`'hast-util-embedded'`) and that your Node.js version is 16 or higher. Update your build tooling if necessary.
Verify your Node.js version is 16 or newer. Double-check that you are using the correct ESM import syntax: `import { embedded } from 'hast-util-embedded'`.No dependency data recorded yet.