{"library":"streaming-markdown","title":"streaming-markdown","type":"library","description":"Streaming Markdown parser for incremental rendering of markdown as it's written, targeting AI chat-style outputs. Current version 0.2.15. Actively developed with experimental features. Ships TypeScript types. Key differentiator: optimistic parsing – immediately renders partial tokens (e.g., inline code, bold) without waiting for closing markers, supporting selectable text during streaming. The library exposes a custom Renderer interface for DOM control, with built-in default renderer and logger renderer. Minimal bundle size (~3 kB gzipped). Requires Node >=20 for server-side use.","language":"javascript","status":"active","last_verified":"Sat May 09","install":{"commands":["npm install streaming-markdown"],"cli":null},"imports":["import { parser } from 'streaming-markdown'","import { default_renderer } from 'streaming-markdown'","import { parser_write } from 'streaming-markdown'"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":"https://thetarnav.github.io/streaming-markdown","github":"https://github.com/thetarnav/streaming-markdown","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/streaming-markdown","openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"import * as smd from 'streaming-markdown';\n\nconst element = document.getElementById('output');\nconst renderer = smd.default_renderer(element);\nconst parser = smd.parser(renderer);\n\nsmd.parser_write(parser, \"# Hello \");\nsmd.parser_write(parser, \"World\\n\\n\");\nsmd.parser_write(parser, \"This is **bold** and *italic* text.\");\nsmd.parser_end(parser);","lang":"typescript","description":"Demonstrates creating a parser with default_renderer, writing markdown chunks, and ending the stream.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}