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

@windowsworldcartoon/debugkit

v1.1.0

Published

A Debugging tool for develepers

Downloads

8

Readme

DebugKit v1.1.0

A comprehensive debugging and logging toolkit for Node.js

Overview

DebugKit is a lightweight yet powerful debugging library for Node.js that provides a simple and intuitive way to log, inspect, and debug your code. Features timestamps, stack traces, performance monitoring, and more.

Features

  • Enhanced Logging: Log messages with optional timestamps and multiple log levels (log, warn, error, info, debug)
  • Object Inspection: Inspect variables and objects with formatted JSON output and optional labels
  • Error Handling: Log errors with optional stack traces for better debugging
  • Performance Monitoring: Built-in timers, counters, and performance metrics
  • Console Utilities: Table formatting, stack traces, grouped output, assertions, and more
  • Timestamp Support: Add ISO timestamps to any log message
  • Batch Logging: Log multiple messages at once with logMultiple()

Installation

To install DebugKit, run the following command:

npm install @windowsworldcartoon/debugkit

Usage

Basic Logging

const debug = require('@windowsworldcartoon/debugkit');

// Simple logging
debug.log('This is a log message');
debug.warn('This is a warning');
debug.info('This is info');
debug.error('This is an error');
debug.debug('This is a debug message');

// With timestamps
debug.log('Message with timestamp', true);
debug.warn('Warning with timestamp', true);

Object Inspection

// Inspect objects with formatted JSON
debug.inspect({ a: 1, b: 2 });

// With a label
debug.inspect({ name: 'John', age: 30 }, 'User Object');

Error Handling

// Log error with stack trace
try {
  throw new Error('Something went wrong');
} catch (err) {
  debug.error(err.message, true); // true = include stack trace
}

Performance Monitoring

// Time execution
debug.time('myTimer');
// ... some code ...
debug.timeEnd('myTimer');

// Count occurrences
debug.count('loop-iteration');
debug.count('loop-iteration');
debug.count('loop-iteration'); // Outputs: loop-iteration: 3

Console Utilities

// Display data in table format
debug.table([
  { name: 'John', age: 30 },
  { name: 'Jane', age: 25 }
]);

// Grouped output
debug.group('My Group');
debug.log('Item 1');
debug.log('Item 2');
debug.groupEnd();

// Stack trace
debug.trace('Custom trace label');

// Assertion
debug.assert(value === expected, 'Values do not match');

// Clear console
debug.clear();

// Log multiple messages
debug.logMultiple(['Message 1', 'Message 2', 'Message 3']);

API Reference

Core Methods

| Method | Parameters | Description | |--------|-----------|-------------| | log(message, includeTimestamp) | message: any, includeTimestamp: boolean | Log a message with optional timestamp | | error(message, includeStack) | message: string/Error, includeStack: boolean | Log an error with optional stack trace | | warn(message, includeTimestamp) | message: any, includeTimestamp: boolean | Log a warning message | | info(message, includeTimestamp) | message: any, includeTimestamp: boolean | Log an info message | | debug(message, includeTimestamp) | message: any, includeTimestamp: boolean | Log a debug message |

Utility Methods

| Method | Parameters | Description | |--------|-----------|-------------| | inspect(object, label) | object: any, label: string | Inspect and log object as formatted JSON | | table(data) | data: Array/Object | Display data in table format | | trace(label) | label: string | Log a stack trace | | assert(condition, message) | condition: boolean, message: string | Assert a condition | | group(label) | label: string | Start a console group | | groupEnd() | none | End a console group | | time(label) | label: string | Start a timer | | timeEnd(label) | label: string | End a timer and log elapsed time | | count(label) | label: string | Count occurrences | | clear() | none | Clear console output | | logMultiple(messages) | messages: Array | Log multiple messages at once |

Changelog

v1.1.0

  • Enhanced existing logging methods with timestamp support
  • Added error logging with optional stack traces
  • New utility methods: table(), trace(), assert(), group(), groupEnd(), time(), timeEnd(), count(), clear(), logMultiple()
  • Improved inspect() method with optional labels
  • Added comprehensive JSDoc documentation
  • Changed variable declaration from var to const

v1.0.4

  • Initial release with basic logging functionality

License

This project is licensed under the MIT License.

MIT License Details

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright

Copyright © 2025 windowsworldcartoon. All rights reserved.

For the full license text, see the LICENSE file in the repository.