@theworker02/specslice · JSR · 1.1.0
Markdown structure extraction for headings, code-fence languages, and TOCs.
Turn Markdown into compact structural data for docs tooling, RFC review, indexing, and automation.
Canonical package: @theworker02/specslice
import { sliceMarkdown, toToc } from "@theworker02/specslice";
const data = sliceMarkdown("# API\n\n```ts\n1\n```");
console.log(toToc(data.headings));