stream-markdown-parser is a pure JavaScript Markdown parsing and rendering utility library designed with streaming capabilities and framework-agnosticism. Currently at version 0.0.86, it exhibits a rapid release cadence with frequent patch and nightly builds, indicating active development. The library provides core Markdown parsing logic, extracted from the `markstream-vue` project, enabling its use in any JavaScript or TypeScript project without direct Vue dependencies. Key differentiators include its lightweight footprint, extensibility via a plugin-based architecture, comprehensive TypeScript support for type safety, and optimized performance for progressive, stream-friendly parsing. It is built upon `markdown-it-ts`, a TypeScript-first distribution of `markdown-it`, maintaining API compatibility while offering richer token type definitions for developers.
npm install stream-markdown-parserVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to use stream-markdown-parser for both incremental (streaming) and static Markdown parsing, outputting a progressively built AST structure. It highlights reusing the parser instance for efficiency.
Regularly review the GitHub repository's changelog and release notes for updates, especially when upgrading to new versions. Consider pinning to exact versions in production environments.
Refer to the main `markstream-vue` GitHub repository for the most comprehensive context on development, issues, and future plans, as this package's lifecycle is intertwined with it.
Understand that `parseMarkdownToStructure` returns an AST for progressive rendering, not HTML. If you need HTML, ensure your workflow explicitly uses the `render` method provided by the `markdown-it-ts` instance returned by `getMarkdown()`.
Ensure you are using standard ESM named imports: `import { getMarkdown } from 'stream-markdown-parser'` and that your environment supports ESM (e.g., Node.js with type:module or a bundler like Webpack/Vite).First, ensure the package is installed: `npm install stream-markdown-parser` or `pnpm add stream-markdown-parser`. If the issue persists, check your bundler configuration (e.g., Vite alias, Webpack resolve paths) to ensure it can correctly locate `node_modules`.
No dependency data recorded yet.