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

debuget

v2.1.1

Published

A pocket-sized debugging dino that pecks away at every error and shows you exactly what went wrong and where—no more hunting through messy stack traces.

Readme

Debuget

npm version license

A pocket‑sized debugging dino that pecks away at every error and shows you exactly what went wrong and where—no more hunting through messy stack traces.


🔥 Features

  • Pretty & Informative: Colored, boxed output with optional emojis
  • Configurable: Turn off colors or emojis; set stack‑trace depth; show/hide full stack
  • Express‑ready: Built‑in middleware to catch and format route errors
  • Process‑safe: Automatically handles uncaught exceptions & unhandled promise rejections
  • Lightweight: Zero runtime dependencies beyond chalk, boxen, and stacktrace-js

🚀 Installation

npm install debuget

or with Yarn:

yarn add debuget

📦 Usage

1) Manual Logging

import { log } from "debuget";

try {
  JSON.parse("not valid JSON");
} catch (err) {
  await log(err);
}

2) Configure the Theme

import { setConfig } from "debuget";

// Set stack trace depth, disable emojis, change colors, etc.
setConfig({
  stackDepth: 5,
  showStack: false,
  colors: true,
  emoji: false,
});

3) Express Error Handler

import express from "express";
import { expressMiddleware } from "debuget";

const app = express();

// ... your routes here ...

// Place _after_ all routes to catch errors:
app.use(expressMiddleware());

app.listen(3000, () => console.log("Server running on port 3000"));

4) CLI / Demo Script

Create a file demo.mjs:

import fs from "fs";
import { log, setConfig } from "debuget";

setConfig({ stackDepth: 3, emoji: true, colors: true });

(async () => {
  try {
    await fs.promises.readFile("no-such-file.txt", "utf8");
  } catch (err) {
    await log(err);
  }
})();

Run it:

node --input-type=module demo.mjs

⚙️ Configuration Options

| Option | Type | Default | Description | | ------------ | ------- | ------- | ----------------------------------------------------------- | | emoji | boolean | true | Show or hide emoji headers | | colors | boolean | true | Enable or disable colored output | | stackDepth | number | 3 | How many stack frames to display in the call journey | | showStack | boolean | true | Show the full raw stack trace in the header (post-metadata) |

Update these at runtime via:

import { setConfig } from "debuget";
setConfig({ colors: false, emoji: false, stackDepth: 10 });

🖼️ Example Console Output

Console Output

Or view it live in your terminal:

node --input-type=module demo.mjs

🧪 Testing

We include a comprehensive test harness in test/test.js. To run:

npm install
npm test

🤝 Contributing

  1. Fork the repo
  2. Create your feature branch: git checkout -b feat/YourFeature
  3. Commit your changes: git commit -m 'feat: add new feature'
  4. Push to the branch: git push origin feat/YourFeature
  5. Open a Pull Request

Please follow conventional commits and update tests/examples if you add functionality.


📄 License

This project is licensed under the MIT License. See LICENSE for details.