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

@deps/debug

v1.1.0

Published

Simple debug logger for Browser/Node.js. Supports TypeScript/ES modules.

Readme

@deps/debug Build Status

Simple debug logger for Browser and Node.js.

Features

  • Provide a single debug function
  • Add caller's file name as prefix to log using StackTracey
  • Support TypeScript
  • Support ES modules import
  • Support Browser and Node.js

This library is inspired by visionmedia/debug.

Install

Install with npm:

npm install @deps/debug

Usage

API

This library provide a debug function.

This debug function output to console if DEBUG MODE is enabled.

import { debug } from "@deps/debug";

debug("log text"):
// => Output to console: "log text"

Tips :bulb:

@deps/debug also provide debug function as debugLog. debugLog is a just alias to debug function.

You can use debugLog to avoid conflict naming with Node.js's utils, visionmedia/debug, or other modules.

import { debugLog } from "@deps/debug";

debugLog("log text"):
// => Output to console: "log text"

Enable DEBUG MODE

debug accept following values as DEBUG.

  • *: Enable all debug log
  • prefix:* Enable debug log that start with prefix:
  • -prefix:* Disable debug log that start with prefix:

Also, debug accept Multiple values as DEBUG. The values should be separated by ,.

a,b,c

Node.js

Enable DEBUG MODE by Environment Variables.

DEBUG=*
DEBUG=prefix:*
DEBUG=-prefix:*
DEBUG=-p1,p2,p3

Notes: Node.js add file name as prefix automatically.

When you specify DEBUG=*/your-file.js, this library output log that file name is your-file.js.

// src/your-file.js
import { debug } from "@deps/debug";

debug("log text"):
// => "src/your-file.js: log text"
debug("log text");
// => No output

Browser

Enable DEBUG MODE by localStorage API.

localStorage.debug = '*';
localStorage.debug = 'prefix:*'
localStorage.debug = '-prefix:*'
localStorage.debug = 'p1,p2,p3'

Force disable logging

DEBUG_CONTROLLER is shared value of the debug module.

import { DEBUG_CONTROLLER } from "@deps/debug"
// Stop logging
DEBUG_CONTROLLER.disable();
// Start logging(by default)
DEBUG_CONTROLLER.enable();

Also you can force enable. This ignore -prefix pattern.

import { DEBUG_CONTROLLER } from "@deps/debug"
DEBUG_CONTROLLER.forceEnable();

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm i -d && npm test

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu

Some codes are copied from following: