npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@firecrawl/anydoc-wasm

v0.1.7

Published

WebAssembly bindings for anydoc: convert documents (doc, docx, odt, rtf, epub, pdf, presentations, spreadsheets, csv) to GitHub-Flavored Markdown in the browser

Readme

@firecrawl/anydoc-wasm

WebAssembly bindings for anydoc, plus the source of the demo page at 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.

npm install @firecrawl/anydoc-wasm
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 <script type="module"> and with bundlers that handle the new URL(..., import.meta.url) asset pattern (Vite, webpack 5, Rollup). In Node, pass the module bytes to initSync instead of calling init (see test.mjs).

Calls are synchronous: wasm runs single-threaded on the calling thread, so convert on a worker if the main thread must stay responsive.

Errors

A conversion throws only when no meaningful Markdown could come out of the bytes. The thrown value is an Error whose code names what went wrong:

try {
  return toMarkdownBytes(bytes);
} catch (error) {
  // No document comes out of these, so record the file and take the next one.
  if (error.code === 'encrypted' || error.code === 'unsupported') {
    unconverted.push({ name, reason: error.code });
    return null;
  }
  throw error;
}

| code | Meaning | | --------------- | ------------------------------------------------------------------- | | unsupported | Unknown format, or one that cannot be converted (an image-only PDF) | | malformed | Structurally unusable: no meaningful content could be extracted | | encrypted | Encrypted or password-protected | | resourceLimit | Crossed a fixed safety limit (decompression, nesting, node count) | | missingPart | A part required for any meaningful output is absent |

error.message carries the detail, naming the package part at fault where the format identifies one. TypeScript gets the union as ConvertErrorCode. The crate's io code has no counterpart here: there is no filesystem to read from.

Building

wasm-pack build wasm --release --target web --scope firecrawl
node --test wasm/test.mjs

This produces the npm package in wasm/pkg/: the module, the JS glue, and TypeScript definitions. Publishing runs from ../.github/workflows/release.yml on release tags.

Demo page

www/ holds the static demo site, which imports the module from www/pkg/. Build into that directory, then serve www/:

wasm-pack build wasm --release --target web --no-pack --out-dir www/pkg
python -m http.server -d wasm/www

../.github/workflows/pages.yml builds and deploys the same layout to GitHub Pages on every push to main.