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

downturn

v2.1.6

Published

Markdown web browser and editor

Readme

Downturn

A markdown web browser. Convert any web page to clean markdown and browse the web in a distraction-free reader. Edit with live preview, open local files and folders, manage bookmarks and history.

Also works as an MCP server for AI agents, a browser extension, and a standalone HTTP API.

GitHub | npm

Web Browser

npm run dev

Open http://localhost:4001. Type a URL, search term, or domain and press Enter.

  • Browse the web in markdown — click links to navigate, Ctrl+click to open in a new tab
  • Tabs — drag to reorder, middle-click to close, Ctrl+T/W to create/close
  • Split view — markdown editor + rendered preview, or toggle to single pane
  • Edit — the markdown pane is always editable with live preview
  • Local files — open .md files or entire folders with a file tree sidebar
  • Save — Ctrl+S saves to the opened file, or triggers Save As
  • Bookmarks — star icon bookmarks the current page, viewable in the sidebar
  • History — automatic, searchable, grouped by date in the sidebar
  • Autocomplete — URL bar suggests from history and bookmarks as you type
  • Search — plain text searches the web; results render as markdown
  • YouTube — paste a YouTube URL to get the video transcript as markdown with optional timestamps
  • GitHub — paste a GitHub repo URL to view the README
  • Site navigation — sidebar extracts nav links from the page, with a site home link
  • Themes — Dark, Light, and Black (OLED). Auto-detects system preference
  • Typography — choose editor and preview fonts with a visual picker, adjust font size, line height, and line width
  • Favicons — shown in tabs, bookmarks, history, and autocomplete
  • PWA — installable as a standalone app with offline support
  • Mobile — responsive layout with touch targets, swipe navigation, and sidebar overlay
  • Zen mode — hide all UI chrome to focus on content

Browser Extension

Available for Chrome and Firefox. Converts the current page to markdown with one click — no server needed. Edit the result, copy to clipboard, or download as .md.

Build:

npm run ext:build

Load unpacked from extension/dist/ in Chrome (chrome://extensions) or as a temporary add-on in Firefox (about:debugging).

Deploy

npx wrangler deploy

Deploys automatically to Cloudflare Workers on version bump via GitHub Actions. Also publishes to npm and creates a GitHub release with the browser extension packages.

MCP Server

{
  "mcpServers": {
    "downturn": {
      "command": "npx",
      "args": ["-y", "downturn"]
    }
  }
}

Tools:

  • url_to_markdown — fetch a URL and return markdown. GitHub repos return the README. YouTube videos return the transcript.
  • html_to_markdown — convert an HTML string to markdown

| Parameter | Default | Description | |-----------|---------|-------------| | output_path | | Full file path to write markdown to | | output_dir | | Directory to write to; filename auto-generated from page title | | include_title | true | Prepend page title as H1 | | include_links | true | Include hyperlinks | | include_images | true | Include images | | use_readability | true | Extract article content | | absolute_urls | true | Resolve relative URLs to absolute |

HTTP API

PORT=3000 node index.mjs
GET /?url=https://example.com&title=true&links=true&clean=true
POST / with html= and url= parameters

Returns Content-Type: text/markdown with CORS headers.

Pipeline

  1. Fetch page (follows redirects)
  2. Strip scripts and styles
  3. Extract article content (Mozilla Readability)
  4. Convert to markdown (Turndown)
  5. Resolve relative URLs to absolute
  6. Strip empty permalink anchors and link titles
  7. Encode parentheses in URLs
  8. Apply site-specific filters (Wikipedia, Medium, Stack Overflow, etc.)

Testing

npm test

580 tests covering the conversion pipeline, URL resolution, link title stripping, permalink anchor stripping, markdown rendering, worker API, MCP integration, nav extraction, title extraction, omnibox, favicons, and debounce. Tests run automatically in CI before deploy.

Structure

worker.mjs                             Cloudflare Worker + local dev server
index.mjs                              HTTP API server
mcp.mjs                                MCP stdio transport
wrangler.toml                          Cloudflare deployment config
url_to_markdown_processor.mjs          Core conversion pipeline
url_to_markdown_common_filters.mjs     Post-processing filters
url_to_markdown_formatters.mjs         Code block and table pre-processing
url_to_markdown_readers.mjs            URL fetching, redirect following
url_to_markdown_apple_dev_docs.mjs     Apple developer docs parser
html_table_to_markdown.mjs             HTML table conversion
title_utils.mjs                        Title extraction and filename slugification

public/
  index.html                           Web UI
  ui.mjs                               Markdown renderer, omnibox, utilities
  db.mjs                               IndexedDB storage (settings, history, bookmarks, cache)
  themes.mjs                           Theme system (dark, light, black)
  sw.js                                Service worker for PWA/offline
  start.md                             Start page content
  site.webmanifest                     PWA manifest

extension/
  manifest.json                        Browser extension manifest (Chrome + Firefox)
  src/                                 Extension source files
  build.mjs                            esbuild bundler
  dist/                                Built extension (gitignored)

lib/
  html_parser.mjs                      DOM parser (vendored JSDOMParser)
  readability.mjs                      Content extraction (vendored Readability)
  turndown.mjs                         HTML to markdown (vendored Turndown)
  html_entities.mjs                    HTML entity decoder
  http_server.mjs                      HTTP server on node:http
  rate_limiter.mjs                     Sliding window rate limiter

Credits

License

MIT