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

dev-inspector

v1.1.1

Published

In-page devtools-style logger panel for web apps (console + network).

Downloads

324

Readme

Dev Inspector

npm downloads license

In-page devtools-style logger panel for web apps. Capture console and network activity, store it in memory, and render it inside a lightweight UI panel.

Dev Inspector preview

Links

  • Website / Live demo: https://dev-inspector.alibugatekin.com/
  • npm: https://www.npmjs.com/package/dev-inspector

Features

  • Console interception: log/info/warn/error/debug
  • Network interception: fetch + XMLHttpRequest
  • In-memory storage with events (EventTarget)
  • UI panel with tabs (Console / Network), counters, severity/status colors, and resize
  • Search across console messages and network requests (URL, method, status, body)
  • Auto-scroll lock with a "Latest" jump button that surfaces unread entries
  • Light / dark theme with localStorage persistence (defaults to light)
  • Configurable panel title (used in the header and the floating toggle)
  • Vite demo playground

Installation

npm i dev-inspector

Quick Start

import { initDevInspector } from "dev-inspector";

initDevInspector({
  maxSize: 500,
  networkOptions: { includeBodies: false },
  panelOptions: {
    initiallyOpen: true,
    title: "My App Inspector",
    theme: "light",
    persistTheme: true,
  },
});

Panel options

| Option | Type | Default | Description | | ----------------- | ------------------- | ----------------------- | ------------------------------------------------------------------------------------ | | title | string | "Dev Inspector" | Label shown in the panel header and the floating toggle pill in the bottom-right | | initiallyOpen | boolean | true | Open the panel on mount | | theme | "light" \| "dark" | "light" | Initial theme. Overridden by a stored value when persistTheme is true | | persistTheme | boolean | true | Persist the user's theme choice in localStorage | | themeStorageKey | string | "dev-inspector:theme" | Key used by localStorage to remember the theme |

The theme can also be toggled at runtime via the sun/moon button in the panel header. When persistTheme is true, the choice is stored under themeStorageKey and restored on the next load.

Important: Browser-only (SSR)

Dev Inspector’s UI (createPanel() and the default initDevInspector() flow) requires a browser environment (it needs document).

If your app uses SSR (Next.js, Remix, Nuxt, SvelteKit, etc.), do not call initDevInspector() at module scope on the server. Initialize it client-side only (e.g. in an effect, lifecycle hook, or a client-only component).

Example (client-only init with dynamic import):

async function initInBrowser() {
  if (typeof window === "undefined") return;
  const { initDevInspector } = await import("dev-inspector");
  initDevInspector({
    panelOptions: { initiallyOpen: true, title: "Dev Inspector" },
  });
}

initInBrowser();

Demo (Local development)

npm install
npm run demo

The demo page includes interactive generators for console logs and network requests so you can verify the panel quickly.

API

initDevInspector()

One-call integration that installs console + network interception and renders the UI panel.

Environment Notes

  • createPanel() requires a browser-like environment (needs document).
  • installNetworkLogger() only captures real browser fetch / XMLHttpRequest traffic.

Contributing

See CONTRIBUTING.md.

License

MIT (see LICENSE).