Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-debug-tool

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-debug-tool

Node debug tool

  • 0.1.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Node Debug Tool

Build Status

Tiny node.js debugging tool with colors and timing functionality

Table of contents

Installation

 $ npm install node-debug-tool

Usage

The DEBUG_MODE environment variable, must be set to a namespace in order to see the debugging information.

Code example:


  var ab = require('../lib/node-debug-tool')('Foo:bar:x');
  var abc = require('../lib/node-debug-tool')('foo:bar:y');
  var abcd = require('../lib/node-debug-tool')('foo:abc');
  var abcde = require('../lib/node-debug-tool')('other');

  ab.log('Some foo bar x');
  abc.log('Some foo bar y');
  abcd.log('Some foo abc');
  other.log('Some other');

The code above possible outputs:

  1. in case of running with DEBUG_MODE=*:
   [Foo:Bar:X] [Debug] "Some foo bar x"  +0ms
   [Foo:Bar:Y] [Debug] "Some foo bar y"  +0ms
   [Foo:Abc] [Debug] "Some foo abc"  +0ms
   [Other] [Debug] "Some other"  +0ms
  1. in case of running with DEBUG_MODE=foo:*:
   [Foo:Bar:X] [Debug] "Some foo bar x"  +0ms
   [Foo:Bar:Y] [Debug] "Some foo bar y"  +0ms
   [Foo:Abc] [Debug] "Some foo abc"  +0ms
  1. in case of running with DEBUG_MODE=foo:bar:*:
   [Foo:Bar:X] [Debug] "Some foo bar x"  +0ms
   [Foo:Bar:Y] [Debug] "Some foo bar y"  +0ms
  1. in case of running with DEBUG_MODE=foo:bar:x:
   [Foo:Bar:X] [Debug] "Some foo bar x"  +0ms

Keywords

FAQs

Package last updated on 08 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc