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

consolemodal

v0.1.0

Published

Display console logs in a draggable, resizable browser modal.

Readme

consolemodal

Display browser logs inside a draggable, resizable modal while preserving native console output.

Features

  • Full standard console API support (log, info, warn, error, debug, trace, dir, dirxml, table, group, time, count, assert, and more)
  • Draggable and resizable modal UI
  • Optional timestamp prefixes
  • Optional global console capture
  • Color-coded method badges for fast scanning
  • ESM + CJS + TypeScript declarations

Installation

npm install consolemodal

Quick Start

import consoleModal from "consolemodal";
import "consolemodal/styles.css";

consoleModal.log("Hello from consolemodal");

API

consoleModal.log(...args)

Logs to both browser console and modal.

consoleModal.info(...args)

Logs info messages.

consoleModal.warn(...args)

Logs warning messages.

consoleModal.error(...args)

Logs error messages.

consoleModal.debug(...args) / consoleModal.trace(...args)

Logs debug and stack-trace output.

consoleModal.dir(...args) / consoleModal.dirxml(...args) / consoleModal.table(...args)

Logs object-inspection and tabular output.

consoleModal.group(...args) / consoleModal.groupCollapsed(...args) / consoleModal.groupEnd()

Supports grouped logs with indentation.

consoleModal.time(label) / consoleModal.timeLog(label) / consoleModal.timeEnd(label)

Supports timer lifecycle logs.

consoleModal.count(label) / consoleModal.countReset(label)

Supports counter lifecycle logs.

consoleModal.assert(condition, ...args)

Logs assertion failures.

consoleModal.show()

Shows the modal.

consoleModal.hide()

Hides the modal.

consoleModal.clear()

Clears all modal entries.

new ConsoleModal(options)

Create a separate modal instance.

Options:

  • title?: string default "Console"
  • autoShow?: boolean default true
  • timestamp?: boolean default true
  • maxEntries?: number default 500
  • captureConsole?: boolean default false

Example with custom instance

import { ConsoleModal } from "consolemodal";
import "consolemodal/styles.css";

const debugModal = new ConsoleModal({
  title: "Debug Console",
  captureConsole: true,
  maxEntries: 1000,
});

debugModal.init();

Development

npm install
npm run lint
npm run typecheck
npm test
npm run prepare

Publishing checklist

  1. Update name, version, author, and repository.url in package.json.
  2. Run npm run prepublishOnly.
  3. Login with npm login.
  4. Publish with npm publish --access public.

License

MIT