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

@kakemono/node

v0.24.3

Published

Convert PDF papers, Word documents, Excel workbooks, PowerPoint presentations, EPUB books and web pages to Markdown, HTML, Word, LaTeX, Typst, EPUB, editable JSON and chunks for RAG

Readme

@kakemono/node

Convert PDF papers, Word documents (.docx, .doc), Excel workbooks (.xlsx), PowerPoint presentations (.pptx), EPUB books and web pages to Markdown, HTML, Word, LaTeX, Typst, EPUB, editable JSON and chunks for RAG, from Node.js. The work is done by kakemono, a Rust library, on threads of its own: the event loop and libuv's pool stay free.

npm install @kakemono/node
const { Document } = require('@kakemono/node')

const doc = await Document.fromFile('paper.pdf')          // or fromBytes, fromUrl, fromArxiv
const { text, files } = await doc.toMarkdown()             // files: [{ path: 'images/…', data: Buffer }]
const chunks = await doc.toChunks({ maxTokens: 512 })      // [{ id, text, tokens, section, pages, … }]
const { data } = await doc.toDocx()                        // a Word document (Buffer)
const html = (await doc.toHtml({ mode: 'hard-95' })).text  // 'hard' | 'hard-95' | 'medium' | 'friendly'

A Document is read and analysed once; every output written from it shares that analysis, and several can be written at once. To translate a document, edit the text of toJson() and open the document again with { content }: every output then shows the edited text.

Options are typed (see index.d.ts); a wrong one rejects with an error whose code is InvalidArg (GenericFailure: a document that cannot be read or written; Unknown: a bug).

Every call can be stopped: give it { signal } (an AbortSignal) or { timeout } (milliseconds), in its options (toPdf({ signal }) and analyze({ signal }) too). It then rejects soon after, normally within a page, with an AbortError (code 'ABORT_ERR', cause the signal's reason) or a TimeoutError (code 'ETIMEDOUT'), also while it waits for its turn; the document stays usable:

const md = await doc.toMarkdown({ signal: AbortSignal.timeout(30_000) })   // or request.signal

At most one conversion per core runs at once (KAKEMONO_MAX_CONCURRENCY to change it); the others wait for their turn, so a burst of requests holds only that many documents in memory. jobs (default: one thread per core) is per document: on a server converting several documents at once, set it to 1.

Prebuilt for Linux (x64, arm64; glibc and musl), macOS (x64, arm64) and Windows (x64, arm64). For browsers, see @kakemono/wasm.