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

duo-check

v0.1.0

Published

Detect responsive design problems at foldable/unusual viewport widths (iPhone Duo and beyond) from the CLI.

Readme

duo-check

Detect responsive design problems at foldable and other unusual viewport widths, starting with the iPhone Duo, from the command line.

npx duo-check https://example.com

Not another resizable-iframe viewer. duo-check loads your page in headless Chromium at a set of viewport widths and reports concrete problems:

  • Horizontal overflow: content wider than the viewport
  • Fixed-width elements: width: 600px that doesn't fit a narrow screen
  • Navigation wrap: nav items spilling onto multiple rows
  • Long line length: text running past ~80 characters per line
iPhone Duo / viewport compatibility

✗ duo-closed   344 × 774
    ✗ [HIGH] Horizontal overflow: page is 616px wide in a 344px viewport (widest offender: div.video, 600px)
    ⚠ [MED]  Fixed width detected: div.video { width: 600px } exceeds 344px viewport
    ⚠ [MED]  Navigation wraps: nav has 9 items wrapping onto 2 rows at 344px

Summary: 1 high, 2 medium, 0 low severity issue(s)

Exits with a non-zero status when any HIGH-severity issue is found, so it can gate CI:

- run: npx duo-check https://mywebsite.com

⚠ About the "duo-*" presets

Apple announced the iPhone Duo on 9 Sept 2026 (ships 23 Oct 2026), but has not published the device's actual CSS viewport dimensions (window.innerWidth/innerHeight). The duo-closed and duo-open presets in src/presets.ts are estimates derived from leaked physical resolutions — treat them as a starting point, not ground truth, until real device or simulator data is available. They'll be updated here once confirmed.

The other presets (320, 768, 1024) don't depend on Duo specifics at all and are useful regardless.

Try it without a real URL

examples/broken.html and examples/fixed.html are the same page — one with each of the four issue types above, the other with each one fixed (scrollable nav instead of wrapping, a capped instead of hardcoded video width, max-width: 70ch on the paragraph). Diff the two files to see exactly what changed.

Local HTML files work directly, no server needed:

git clone https://github.com/uguratmaca/duo-check.git
cd duo-check
npm install && npm run build

node dist/cli.js examples/broken.html   # reports 2 high, 4 medium, 2 low
node dist/cli.js examples/fixed.html    # clean, exit code 0

Usage

duo-check <url-or-local-file> [options]

Options:
  -p, --presets <names>  comma-separated preset names or widths (default: all built-in presets)
  --width <n>             test a single custom width (px)
  --height <n>            height to pair with --width (px)
  --json                  machine-readable output

Examples:

npx duo-check https://example.com
npx duo-check https://example.com --presets duo-open,1024
npx duo-check https://example.com --width 540 --height 720
npx duo-check https://example.com --json > report.json

Requires Node.js 18+. duo-check depends on Playwright, which downloads a Chromium build on first npm install (no extra setup step needed, but expect that install to take a bit longer and pull down a few hundred MB).

Programmatic usage

The four detectors are also published as a dependency-free engine, importable on its own for embedding elsewhere (e.g. a browser extension content script) without pulling in Playwright or Node:

import { detectOverflow, detectFixedWidth, detectNavWrap, detectLineLength } from "duo-check/engine";

// each function runs directly in a browser context and returns Issue[]
const issues = detectOverflow(window.innerWidth);

See src/engine/index.ts for the full exported surface.

Development

npm install
npm run build
node dist/cli.js <url>

License

MIT