very-small-parser is a lightweight JavaScript parser designed for Markdown, HTML, and inline CSS, operating as a dependency-free solution. It currently sits at version 1.14.0 and maintains a relatively active release cadence, typically pushing minor feature updates and bug fixes every 1-3 months. A key differentiator is its minimal footprint, weighing in at just over 4KB (minified module), making it suitable for performance-sensitive browser environments as well as Node.js applications. It parses Markdown into an MDAST (Markdown Abstract Syntax Tree) compliant structure and HTML into HAST (Hypertext Abstract Syntax Tree), facilitating interoperability with other syntax tree processing tools. It also includes utilities for converting between these ASTs and pretty-printing them back to text.
npm install very-small-parserVerified import paths — ran on the pinned version, not inferred.
Demonstrates parsing Markdown to MDAST and HTML to HAST, then converting the ASTs back to their respective string formats, including pretty-printing HTML.
Always test parsing outputs with critical content after updates. Consider pinning to exact patch versions if output stability is paramount for your application logic relying on specific AST structures.
Refer to the documentation for the exact import path of each specific utility. Use named imports from these specific sub-paths.
Ensure you are calling the correct method for the type of content you are parsing. For Markdown, differentiate between `block` and `inline` parsing contexts.
Run `npm install very-small-parser` or `yarn add very-small-parser` in your project directory.
Ensure you are using ESM `import { markdown } from 'very-small-parser';` and running your environment as an ESM module (e.g., `"type": "module"` in `package.json` for Node.js or using a bundler for browser).Verify that `import { markdown } from 'very-small-parser';` is correctly specified and that the module resolution is working in your environment.No dependency data recorded yet.