{"_id":"@momiji-rs/sparkdown","_rev":"7-84eeb3802862a49f091ca92d40eb201c","name":"@momiji-rs/sparkdown","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.1":{"name":"@momiji-rs/sparkdown","version":"0.0.1","keywords":["markdown","commonmark","html","wasm","webassembly","parser","renderer"],"author":{"name":"rubyrs contributors"},"license":"MIT","_id":"@momiji-rs/sparkdown@0.0.1","maintainers":[{"name":"linyiru","email":"deduce@gmail.com"}],"homepage":"https://github.com/momiji-rs/sparkdown#readme","bugs":{"url":"https://github.com/momiji-rs/sparkdown/issues"},"dist":{"shasum":"2fe92fa25ccddf1afe5eab40df9074fbfdfd6d2a","tarball":"https://registry.npmjs.org/@momiji-rs/sparkdown/-/sparkdown-0.0.1.tgz","fileCount":5,"integrity":"sha512-JejxXhtNwuqxyrEZ9wiVgwOVmH1FwxdRnwNLuuM9lXOnldTbEMBOfRjTNqRBg26zhfbv7lnqr2TsdkDQtXYLFg==","signatures":[{"sig":"MEUCIQCFsQ//k3i5b/mOeQx3dYevm3qF7hQMndKE6ZD5oCguIwIgcpkTGqUyoVRqG+XeF7nMXlU8P9PfO17gbZrW03EjkDo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":231959},"main":"./sparkdown.mjs","type":"module","types":"./index.d.ts","module":"./sparkdown.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","default":"./sparkdown.mjs"}},"gitHead":"30881300d4eea94ea14f9a5ef754f578bf40311d","_npmUser":{"name":"linyiru","email":"deduce@gmail.com"},"repository":{"url":"git+https://github.com/momiji-rs/sparkdown.git","type":"git","directory":"npm"},"_npmVersion":"10.9.4","description":"Fast, standards-first CommonMark → HTML (100% CommonMark 0.31.2), as WASI-free WebAssembly. Zero dependencies; runs in Node, browsers, bundlers, Deno, and edge runtimes.","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sparkdown_0.0.1_1782352549674_0.1361323518168489","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@momiji-rs/sparkdown","version":"0.0.2","keywords":["markdown","commonmark","html","wasm","webassembly","parser","renderer"],"author":{"name":"rubyrs contributors"},"license":"MIT","_id":"@momiji-rs/sparkdown@0.0.2","maintainers":[{"name":"linyiru","email":"deduce@gmail.com"}],"homepage":"https://github.com/momiji-rs/sparkdown#readme","bugs":{"url":"https://github.com/momiji-rs/sparkdown/issues"},"dist":{"shasum":"1204011f153e0b86f2ccc50bd4e19ef370ed1224","tarball":"https://registry.npmjs.org/@momiji-rs/sparkdown/-/sparkdown-0.0.2.tgz","fileCount":5,"integrity":"sha512-ohmvLv/c9C7++5qQcD+Qz+7Jg0ApXVudAC5mnPqAS7+nvNczyE+YjI4oytFkLdr/YBeE5znZt9YMI00lvIfh8A==","signatures":[{"sig":"MEUCIQDzABGhsf9U3DB4456itHsvWVpvjlYiCREvhgRw7tOHvQIgMeftRIbTaEh7sxYTeYtknK6K5A5sXGvr/udoaG31NVM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@momiji-rs%2fsparkdown@0.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":230410},"main":"./sparkdown.mjs","type":"module","types":"./index.d.ts","module":"./sparkdown.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","default":"./sparkdown.mjs"}},"gitHead":"6f523b8a0f4cbba17b34b8f28dfa9ef49f1963a0","scripts":{"test":"node test.mjs","build":"node build.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3284d719-e5be-4060-843a-24973c6fcc22"}},"repository":{"url":"git+https://github.com/momiji-rs/sparkdown.git","type":"git","directory":"npm"},"_npmVersion":"11.13.0","description":"Fast, standards-first CommonMark → HTML (100% CommonMark 0.31.2), as WASI-free WebAssembly. Zero dependencies; runs in Node, browsers, bundlers, Deno, and edge runtimes.","directories":{},"sideEffects":false,"_nodeVersion":"24.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sparkdown_0.0.2_1782393385311_0.8010398147986866","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@momiji-rs/sparkdown","version":"0.0.3","keywords":["markdown","commonmark","html","wasm","webassembly","parser","renderer"],"author":{"name":"rubyrs contributors"},"license":"MIT","_id":"@momiji-rs/sparkdown@0.0.3","maintainers":[{"name":"linyiru","email":"deduce@gmail.com"}],"homepage":"https://github.com/momiji-rs/sparkdown#readme","bugs":{"url":"https://github.com/momiji-rs/sparkdown/issues"},"dist":{"shasum":"b0da6007974d3b64210b05621bb4d5834f02b67c","tarball":"https://registry.npmjs.org/@momiji-rs/sparkdown/-/sparkdown-0.0.3.tgz","fileCount":5,"integrity":"sha512-FzwqLZmPZr2MrYxamtJfeBjxusco7809KX2N9VHLEKpEOAu8GgmbbLO3J3glxILYSpy2D4N8ie29NP2E5xVwQw==","signatures":[{"sig":"MEQCIFZApvjP5Ru/v0fGUsHjKuV29lCenRPIxIVQlq5kvWPoAiBlHeJpVR3fwA9JlUnlxoRLytC6k0C8r3M+IygE0jsmKA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@momiji-rs%2fsparkdown@0.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":232063},"main":"./sparkdown.mjs","type":"module","types":"./index.d.ts","module":"./sparkdown.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","default":"./sparkdown.mjs"}},"gitHead":"20cb644ffa34d8905b3b9a0b4b7aff6ae4ed6e1c","scripts":{"test":"node test.mjs","build":"node build.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3284d719-e5be-4060-843a-24973c6fcc22"}},"repository":{"url":"git+https://github.com/momiji-rs/sparkdown.git","type":"git","directory":"npm"},"_npmVersion":"11.13.0","description":"Fast, standards-first CommonMark → HTML (100% CommonMark 0.31.2), as WASI-free WebAssembly. Zero dependencies; runs in Node, browsers, bundlers, Deno, and edge runtimes.","directories":{},"sideEffects":false,"_nodeVersion":"24.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sparkdown_0.0.3_1782394745630_0.7795987887352358","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@momiji-rs/sparkdown","version":"0.0.4","keywords":["markdown","commonmark","html","wasm","webassembly","parser","renderer"],"author":{"name":"rubyrs contributors"},"license":"MIT","_id":"@momiji-rs/sparkdown@0.0.4","maintainers":[{"name":"linyiru","email":"deduce@gmail.com"}],"homepage":"https://github.com/momiji-rs/sparkdown#readme","bugs":{"url":"https://github.com/momiji-rs/sparkdown/issues"},"dist":{"shasum":"8026119b9b8552793234d14a17a0dbbab813581f","tarball":"https://registry.npmjs.org/@momiji-rs/sparkdown/-/sparkdown-0.0.4.tgz","fileCount":8,"integrity":"sha512-AVy2A/D623xI+wG1HFpNymrJz6onDQlw3HnkaqyLXSgTEA13LVeFgXNGWBaAl4kR1105I3k/YSOWrihpnF+IXA==","signatures":[{"sig":"MEQCIEopnTqjIZbJcX69LaU98BSbH5C2DfVd3lBHcLqP37dKAiAfz1Oj45f4D16KIWWSYJEuyY4Wpr5o+T3DH6rFglQJAA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@momiji-rs%2fsparkdown@0.0.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":510721},"main":"./sparkdown.mjs","type":"module","types":"./index.d.ts","module":"./sparkdown.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","default":"./sparkdown.mjs"},"./gfm":{"types":"./gfm.d.ts","default":"./gfm.mjs"}},"gitHead":"32e55e4aa90e8c10ab9065c548bf6dc9d2d31794","scripts":{"test":"node test.mjs","build":"node build.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3284d719-e5be-4060-843a-24973c6fcc22"}},"repository":{"url":"git+https://github.com/momiji-rs/sparkdown.git","type":"git","directory":"npm"},"_npmVersion":"11.13.0","description":"Fast, standards-first CommonMark → HTML (100% CommonMark 0.31.2), as WASI-free WebAssembly — zero dependencies, runs in Node/browsers/bundlers/Deno/edge. Optional GitHub Flavored Markdown via the `@momiji-rs/sparkdown/gfm` subpath.","directories":{},"sideEffects":false,"_nodeVersion":"24.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sparkdown_0.0.4_1782396062266_0.5047266511471105","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@momiji-rs/sparkdown","version":"0.0.5","keywords":["markdown","commonmark","html","wasm","webassembly","parser","renderer"],"author":{"name":"rubyrs contributors"},"license":"MIT","_id":"@momiji-rs/sparkdown@0.0.5","maintainers":[{"name":"linyiru","email":"deduce@gmail.com"}],"homepage":"https://github.com/momiji-rs/sparkdown#readme","bugs":{"url":"https://github.com/momiji-rs/sparkdown/issues"},"dist":{"shasum":"c19582aa1334ae5fb3165d5b54fc356ff137259a","tarball":"https://registry.npmjs.org/@momiji-rs/sparkdown/-/sparkdown-0.0.5.tgz","fileCount":11,"integrity":"sha512-6kCi7bgwRe1Ht0/OY9fkSA/3Naa7lqDBuoMJeup+5lREe0wnaTQNI/mRrDIYUoSpjz4olXyJ+Q+Y7UN4bpjeOw==","signatures":[{"sig":"MEUCIQDbpQ/qUAJWRoIcaVVLZY5+SGgJ0AcairZq2vMTZazBOQIge2dpdgYLaFlzoGkrapy8QW7O8wPyzqABdLwReMg1qcE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@momiji-rs%2fsparkdown@0.0.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":992147},"main":"./sparkdown.mjs","type":"module","types":"./index.d.ts","module":"./sparkdown.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","default":"./sparkdown.mjs"},"./gfm":{"types":"./gfm.d.ts","default":"./gfm.mjs"},"./full":{"types":"./full.d.ts","default":"./full.mjs"}},"gitHead":"0c831d079882c28ea90f6f576cdbb42c2e314e42","scripts":{"test":"node test.mjs","build":"node build.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3284d719-e5be-4060-843a-24973c6fcc22"}},"repository":{"url":"git+https://github.com/momiji-rs/sparkdown.git","type":"git","directory":"npm"},"_npmVersion":"11.13.0","description":"Fast, standards-first CommonMark → HTML (100% CommonMark 0.31.2), as WASI-free WebAssembly — zero dependencies, runs in Node/browsers/bundlers/Deno/edge. GitHub Flavored Markdown via the `/gfm` subpath; every extension via `/full`.","directories":{},"sideEffects":false,"_nodeVersion":"24.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sparkdown_0.0.5_1782483703782_0.5927267902193318","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"@momiji-rs/sparkdown","version":"0.0.6","keywords":["markdown","commonmark","html","wasm","webassembly","parser","renderer","mdast","remark","remark-parse","unified","unist","gfm"],"author":{"name":"rubyrs contributors"},"license":"MIT","_id":"@momiji-rs/sparkdown@0.0.6","maintainers":[{"name":"linyiru","email":"deduce@gmail.com"}],"homepage":"https://github.com/momiji-rs/sparkdown#readme","bugs":{"url":"https://github.com/momiji-rs/sparkdown/issues"},"dist":{"shasum":"8e5f2d91842352a606b272ef9315c08c3643d297","tarball":"https://registry.npmjs.org/@momiji-rs/sparkdown/-/sparkdown-0.0.6.tgz","fileCount":14,"integrity":"sha512-sdAV7veuLGSzIeqo2XfUlYthOHnKP8vxJFpT+xmaFQP95HQL3+CsSDapw/ImlYqLst1LDBxBtOJgRgGhL8pEFA==","signatures":[{"sig":"MEYCIQDEGV0JUrnR22PGzIG7Woex3fMbHoGBeKqci4ucEFjzMAIhALrSoqKjc28rWlQZcOB634TGFF+EqxGvAt0LFxUJ6Wsj","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@momiji-rs%2fsparkdown@0.0.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1608757},"main":"./sparkdown.mjs","type":"module","types":"./index.d.ts","module":"./sparkdown.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","default":"./sparkdown.mjs"},"./gfm":{"types":"./gfm.d.ts","default":"./gfm.mjs"},"./full":{"types":"./full.d.ts","default":"./full.mjs"},"./mdast":{"types":"./mdast.d.ts","default":"./mdast.mjs"}},"gitHead":"90d01785d26fdce59727e23ae5262507be965804","scripts":{"test":"node test.mjs","build":"node build.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3284d719-e5be-4060-843a-24973c6fcc22"}},"repository":{"url":"git+https://github.com/momiji-rs/sparkdown.git","type":"git","directory":"npm"},"_npmVersion":"11.13.0","description":"Fast, standards-first CommonMark → HTML (100% CommonMark 0.31.2), as WASI-free WebAssembly — zero dependencies, runs in Node/browsers/bundlers/Deno/edge. GitHub Flavored Markdown via the `/gfm` subpath; every extension via `/full`; a ~80× faster drop-in r","directories":{},"sideEffects":false,"_nodeVersion":"24.17.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sparkdown_0.0.6_1782501865697_0.27501356205049454","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@momiji-rs/sparkdown","version":"0.1.0","description":"Fast, standards-first CommonMark → HTML (100% CommonMark 0.31.2), as WASI-free WebAssembly — zero dependencies, runs in Node/browsers/bundlers/Deno/edge. GitHub Flavored Markdown via the `/gfm` subpath; every extension via `/full`; a ~80× faster drop-in r","type":"module","main":"./sparkdown.mjs","module":"./sparkdown.mjs","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./sparkdown.mjs"},"./gfm":{"types":"./gfm.d.ts","default":"./gfm.mjs"},"./full":{"types":"./full.d.ts","default":"./full.mjs"},"./mdast":{"types":"./mdast.d.ts","default":"./mdast.mjs"}},"sideEffects":false,"scripts":{"build":"node build.mjs","test":"node test.mjs"},"keywords":["markdown","commonmark","html","wasm","webassembly","parser","renderer","mdast","remark","remark-parse","unified","unist","gfm"],"license":"MIT","author":{"name":"rubyrs contributors"},"homepage":"https://github.com/momiji-rs/sparkdown#readme","repository":{"type":"git","url":"git+https://github.com/momiji-rs/sparkdown.git","directory":"npm"},"bugs":{"url":"https://github.com/momiji-rs/sparkdown/issues"},"engines":{"node":">=18"},"gitHead":"6c0726d118b400b8ba4739cdca486c28748910fd","_id":"@momiji-rs/sparkdown@0.1.0","_nodeVersion":"24.17.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-5qNbEWqCAzdq2InMk8PfjWjaAP2A2DrmZnaP3Qnuan0+hZO1dorXbKe0w+rIUwbK09A7E/wqZcI+oJLP6IBtXQ==","shasum":"0989379938a3b8f4eff312e000486b1750792f3e","tarball":"https://registry.npmjs.org/@momiji-rs/sparkdown/-/sparkdown-0.1.0.tgz","fileCount":14,"unpackedSize":1681463,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@momiji-rs%2fsparkdown@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDAv7+1u86Y5SuHuRVJKAO4WqfI3faljExQCVtCoDWaGAiEAg8OecQWs/hrIp/B60oyZVGU65iGBVJGmdhG/SeqpoF0="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3284d719-e5be-4060-843a-24973c6fcc22"}},"directories":{},"maintainers":[{"name":"linyiru","email":"deduce@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sparkdown_0.1.0_1782601429454_0.43998382485311693"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-25T01:55:49.505Z","modified":"2026-06-27T23:03:49.937Z","0.0.1":"2026-06-25T01:55:49.813Z","0.0.2":"2026-06-25T13:16:25.451Z","0.0.3":"2026-06-25T13:39:05.775Z","0.0.4":"2026-06-25T14:01:02.441Z","0.0.5":"2026-06-26T14:21:44.007Z","0.0.6":"2026-06-26T19:24:25.868Z","0.1.0":"2026-06-27T23:03:49.689Z"},"bugs":{"url":"https://github.com/momiji-rs/sparkdown/issues"},"author":{"name":"rubyrs contributors"},"license":"MIT","homepage":"https://github.com/momiji-rs/sparkdown#readme","keywords":["markdown","commonmark","html","wasm","webassembly","parser","renderer","mdast","remark","remark-parse","unified","unist","gfm"],"repository":{"type":"git","url":"git+https://github.com/momiji-rs/sparkdown.git","directory":"npm"},"description":"Fast, standards-first CommonMark → HTML (100% CommonMark 0.31.2), as WASI-free WebAssembly — zero dependencies, runs in Node/browsers/bundlers/Deno/edge. GitHub Flavored Markdown via the `/gfm` subpath; every extension via `/full`; a ~80× faster drop-in r","maintainers":[{"name":"linyiru","email":"deduce@gmail.com"}],"readme":"# @momiji-rs/sparkdown\n\nFast, standards-first **CommonMark → HTML** — and the fastest drop-in\n**`remark-parse`** — compiled to **WASI-free WebAssembly**.\n\n- ✅ **100% CommonMark 0.31.2** — all 652 official examples pass *through the wasm*.\n- 🚀 **~0.9 ms** to render the 200 KB CommonMark spec — ~5× faster than\n  markdown-it/marked, and faster than rushdown's *native* build; the native\n  crate does it in ~0.59 ms.\n- 🌳 **Fastest `remark-parse`.** The [`/mdast`](#mdast--the-fastest-remark-parse)\n  subpath emits a unist/mdast tree that **deep-equals `mdast-util-from-markdown`**\n  on all 652 examples — ~80× faster, drop-in for unified / remark / rehype.\n- 🪶 **Zero dependencies, self-contained.** The wasm is base64-inlined, so it\n  works in Node, browsers, bundlers, Deno, Bun, and edge runtimes (Cloudflare\n  Workers, Fastly, Vercel) with no `fetch`, `fs`, WASI, or asset configuration.\n\n```bash\nnpm install @momiji-rs/sparkdown\n```\n\n```js\nimport { toHtml } from \"@momiji-rs/sparkdown\";\n\nconst html = await toHtml(\"# Hello *world*\\n\\nWith a [link](https://example.com).\");\n// <h1>Hello <em>world</em></h1>\\n<p>With a <a href=\"https://example.com\">link</a>.</p>\\n\n```\n\nImporting has **no side effect** — the wasm instantiates lazily. For synchronous\nuse, call `initSync()` once (server-side: Node/Bun/Deno/edge/workers, *not* the\nbrowser main thread) or `await ready` in browsers:\n\n```js\nimport { initSync, toHtmlSync } from \"@momiji-rs/sparkdown\";\n\ninitSync(); // sync, idempotent — once, on first use\nfor (const post of posts) post.html = toHtmlSync(post.markdown); // sync, hot loop\n```\n\n## API\n\n| export | signature | notes |\n| --- | --- | --- |\n| `toHtml` | `(markdown: string) => Promise<string>` | lazily instantiates the wasm |\n| `toHtmlSync` | `(markdown: string) => string` | needs a prior `initSync()` / `await ready` |\n| `initSync` | `() => unknown` | **sync** instantiation (idempotent); server-side only |\n| `ready` | `PromiseLike<void>` | lazily instantiates once awaited |\n| `init` | `() => Promise<unknown>` | async instantiation (idempotent) |\n\n`toHtml` is also the default export. TypeScript types are bundled.\n\n## Extensions — the `/gfm` and `/full` subpaths\n\nThe package root is pure CommonMark (smallest wasm). Two subpaths add extensions\n— same engine, a larger wasm, and a `toHtml(md, options)` that toggles each one\nper call:\n\n```js\nimport { toHtml } from \"@momiji-rs/sparkdown/gfm\";  // + GitHub Flavored Markdown\nawait toHtml(\"~~done~~ and www.example.com\");\nawait toHtml(md, { tables: false }); // toggle a flag\n\nimport { toHtml } from \"@momiji-rs/sparkdown/full\"; // + every extension\nawait toHtml(\":::note\\n`:tada:` ~~x~~\\n:::\");       // directives, emoji, … on by default\n```\n\n| subpath | adds | wasm |\n| --- | --- | --- |\n| `@momiji-rs/sparkdown` | — (CommonMark) | ~182 KB |\n| `@momiji-rs/sparkdown/gfm` | strikethrough, tasklists, autolinks, tag filter, tables, footnotes | ~239 KB |\n| `@momiji-rs/sparkdown/full` | + frontmatter, emoji, definition lists, directives, diagrams, external-link `rel`, heading ids | ~319 KB |\n| `@momiji-rs/sparkdown/mdast` | markdown → mdast tree + a unified `remark-parse` plugin (see below) | ~440 KB |\n\nA bundler ships only the subpath you import. The `.` / `/gfm` / `/full` entries\nshare the same `toHtml` / `toHtmlSync` / `initSync` / `ready` / `init` surface;\n`/mdast` adds `toMdast` and a unified parser plugin.\n\n## mdast — the fastest `remark-parse`\n\n`@momiji-rs/sparkdown/mdast` emits a full **mdast (unist)** tree — the exact shape\n`remark-parse` produces — as a drop-in, **~80× faster** parser for the unified /\nremark / rehype ecosystem:\n\n```js\nimport { unified } from \"unified\";\nimport sparkdownParse from \"@momiji-rs/sparkdown/mdast\"; // drop-in remark-parse\nimport remarkRehype from \"remark-rehype\";\nimport rehypeStringify from \"rehype-stringify\";\n\nawait sparkdownParse.ready; // browsers only; Node/Bun/Deno/edge need no await\nconst html = String(unified()\n  .use(sparkdownParse)\n  .use(remarkRehype)\n  .use(rehypeStringify)\n  .processSync(markdown));\n```\n\nOr call it directly — `toMdast(md, options)` → tree, `toHtml(md, options)` → HTML\n(an in-wasm `mdast → html` render, byte-identical to `mdast-util-to-hast` +\n`hast-util-to-html`). The tree is **plain unist objects** (not opaque handles), so\nevery remark plugin works unmodified; it **deep-equals `mdast-util-from-markdown`\non all 652** CommonMark examples *including* `position`. Pass `{ position: false }`\nfor ~2× faster parsing when your plugins don't read source positions.\n\n| export | signature |\n| --- | --- |\n| `sparkdownParse` (default) | unified parser plugin — `unified().use(sparkdownParse)` |\n| `toMdast` / `toMdastSync` | `(markdown, options?) => mdast tree` |\n| `toHtml` / `toHtmlSync` | `(markdown, options?) => string` (in-wasm mdast→html) |\n| `initSync` / `init` / `ready` | instantiation (as in the other entries) |\n\n## How it's built\n\nThe package wraps a `wasm32-unknown-unknown` build of the\n[sparkdown](https://github.com/momiji-rs/sparkdown) Rust crate via a tiny raw\nC-ABI (`sparkdown_alloc` / `sparkdown_free` / `sparkdown_to_html`) — no\n`wasm-bindgen`. The wasm uses `+simd128` (vectorized inline scan + escape) and\n`+bulk-memory` (native `memory.copy`), so it needs a host from ~2021 onward\n(all current browsers, Node 16+, Deno, Bun, modern edge runtimes).\n\n## License\n\nMIT.\n","readmeFilename":"README.md"}