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 🙏

© 2025 – Pkg Stats / Ryan Hefner

drapdebug

v2.1.1

Published

debug utility tool

Readme

drapdebug

A simple tool for Nodejs to help you debug your API Application, by receiving detailed debug messages in your console. Created by Matt Drapchaty

Install

Using drapdebug your npm in your CLI type:

npm install drapdebug

Dependenices

The dependencies required can be found in the package.json folder, if you would like to edit the package or use the built in testing please use your npm install to install the following:

    "eslint": "^3.17.1",
    "eslint-config-airbnb": "^14.1.0",
    "eslint-plugin-import": "^2.2.0",
    "eslint-plugin-jsx-a11y": "^4.0.0",
    "eslint-plugin-react": "^6.10.0",
    "mocha-sinon": "^1.1.6",
    "sinon": "^1.17.7"

Usage

In order to turn on the debug feature you must include the following Environmental Variable to your local project. You can do this by using your npm to install dotenv:

npm install dotenv

..Then create a file named .env in your root directory and declare Environmental variable of DEBUG=true

DEBUG=true

Make sure you are requiring dotenv in your project

require('dotenv').config();

Make sure you require drapdebug in your script:

var util = require('drapdebug');

drapdebug will allow you to insert a message you would like to log when a particular method/function/conditional is running. You can then insert the debugger inside your API routes with a robust detailed message indicating success/fail/etc in console:

util.debug('Insert message you would like to log here.', type)

The first argument is the message you would like to log when this is called.The second parameter which says type can be used to color code these messages based on the type and should be either 'log','warn', or 'error' if you want the messages to be in corresponding colors. will be displayed in your console.

Version Bumper

There is also a built in Version Bumper, that will update your package with semantic versioning based on your input of the current version and 'patch', 'minor', or 'major' based upon the changes made. It works just like the debug feature, but you will use it with util.verBump . This will automatically update your version and make a commit and push to Github.


// Bump versions (patch, minor, major)

util.verBump('2.0.1', 'patch');
util.verBump('2.0.1', 'minor');
util.verBump('2.0.1', 'major');

Unit Testing

drapdebug has been unit tested with chai and mocha and comes with built in testing. Make sure these packages are installed locally to the project folder. To run tests on this package, download the drapdebug project folder from GitHub.Direct to the drapdebug project folder in your CLI. Make sure chai and mocha are installed to drapdebug project in your dependencies.

To run tests use the following command in your CLI: DEBUG=true mocha

This will test the debugger as well as the give you a console log of how the version bumper feature will update from current version 2.0.0, by 'patch', 'minor', or 'major' update.