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

@stnd/ingest

v0.1.0

Published

Document-to-Markdown converter for Standard Garden. Supports DOCX, PDF, HTML, and RTF.

Readme


title: "@stnd/ingest" aliases: [] created: 2026-07-05 07:40 modified: 2026-07-05 19:22 last_audited: 2026-07-14 audit_interval_days: 90 next_audit: 2026-10-12 audit_priority: 3 maturity: sprout mode: read publish: false status: active tags:

  • package
  • stnd theme: kernel type: package visibility: private

@stnd/ingest

Document-to-Markdown converter for the Standard Framework.

Converts DOCX, PDF, HTML, and RTF files into clean Markdown — ready for @stnd/press to render beautifully.

ELI5

Someone drops a Word doc, a PDF, or a random HTML export into your app — this turns it into plain Markdown so @stnd/press can typeset it properly. The heavy converters (mammoth for Word, pdfjs-dist for PDF) only load when that specific format is actually used.

Use it:

import { convertDocumentToMarkdown } from "@stnd/ingest";
const markdown = await convertDocumentToMarkdown(file);

Philosophy

Strip everything that isn’t content. No formatting noise. The Press will apply beautiful typography automatically.

Supported Formats

| Format | Extensions | Engine | | :-------------------- | :-------------- | :----------------------------------------------------------------------- | | Plain text / Markdown | .txt, .md | Pass-through | | Microsoft Word | .docx, .doc | mammoth (lazy-loaded) | | HTML | .html, .htm | html-to-md | | PDF | .pdf | pdfjs-dist (lazy-loaded) | | Rich Text Format | .rtf | Basic text extraction |

Heavy dependencies (mammoth, pdfjs-dist) are lazy-loaded — they only get imported when you actually convert that format.

Usage

import {
  convertDocumentToMarkdown,
  extractDocumentTitle,
  isSupportedDocument,
} from "@stnd/ingest";

// Check if a file can be converted
if (isSupportedDocument(file)) {
  // Convert to clean markdown
  const markdown = await convertDocumentToMarkdown(file);

  // Extract a title from the resulting markdown
  const title = extractDocumentTitle(markdown, file.name);
}

API

convertDocumentToMarkdown(file): Promise<string>

Accepts a File object (or any object with name, type, text(), and arrayBuffer() methods). Returns clean Markdown.

extractDocumentTitle(markdown, filename?): string

Extracts a title from converted Markdown content. Checks headings first, then the first line, then falls back to the filename.

isSupportedDocument(file): boolean

Checks whether a file can be converted based on its MIME type or extension.

getSupportedMimeTypes(): string[]

Returns all MIME types that can be converted.

getSupportedExtensions(): string[]

Returns all file extensions that can be converted.

Relationship to other packages

User drops a file
       ↓
  @stnd/ingest     →  "Here's clean Markdown"
       ↓
  @stnd/press      →  "Here's beautiful HTML"

@stnd/ingest handles the messy input. @stnd/press handles the beautiful output. Clean separation of concerns.

Notes / Observations

(jot down anything noticed here — quirks, gotchas, ideas)

Todo

  • [ ] Maybe relocate to stnd.gd (app need > framework need). [priority:: 3] [token_scale:: 3] [created:: 2026-07-14] [area:: framework]