# @firecrawl/anydoc-wasm WebAssembly bindings for [anydoc](../README.md), plus the source of the demo page at [firecrawl.github.io/anydoc](https://firecrawl.github.io/anydoc/). The API mirrors the Rust library, minus the path-based `to_markdown`: wasm has no filesystem, so conversion always starts from bytes. ```bash npm install @firecrawl/anydoc-wasm ``` ```js import init, { formatFromBytes, toMarkdownBytes, toDocument, } from '@firecrawl/anydoc-wasm'; await init(); // With the format detected from the content: const markdown = toMarkdownBytes(bytes); // Or name it, which signature-less formats (CSV) need: const fromCsv = toMarkdownBytes(bytes, 'csv'); // Or stop at the document model, which also carries embedded assets: const document = toDocument(bytes); // Format detection on its own: formatFromBytes(bytes); // 'docx', or undefined when nothing matches ``` The package is built with `wasm-pack --target web`: it loads with a plain `