Socket
Socket
Sign inDemoInstall

bug-killer

Package Overview
Dependencies
2
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bug-killer

A colored way to find bugs and fix them.


Version published
Weekly downloads
1.3K
increased by15.81%
Maintainers
1
Install size
16.0 kB
Created
Weekly downloads
 

Readme

Source

bug-killer

A colored way to find bugs and fix them.

Installation

Run the following commands to download and install the application:

$ git clone git@github.com:IonicaBizau/node-bug-killer.git bug-killer
$ cd bug-killer
$ npm install

Documentation

Methods

log(message, type)

Displays debug messages by providing the type.

  • message (String): The debug message that should be displayed
  • type (String): The message type (e.g. "error", "info" etc)

Returns the BugKiller instance

Other fields

_config

An object contaning the configuration of the module. Default:

{
    error: {
        color: [255, 0, 0]
      , text: "ERROR"
      , level: 1
    }
  , warn: {
        color: [200, 200, 0]
      , text: "WARN"
      , level: 2
    }
  , info: {
        color: [0, 200, 255]
      , text: "INFO"
      , level: 3
    }
  , displayDate: true
  , logLevel: 2
}

It can be extended to accept any type of message (see example).

Example

// Dependencies
var Debug = require("../index");

// Test defaults
Debug
  .log("A fancy error message", "error")
  .log("Info messages are useful", "info")
  .log("Hey, you've got a warning", "warn")
  ;

// Don't show date
Debug._config.displayDate = false;
Debug.log("Display date is disabled.", "info");

// Custom type
Debug._config.myType = {
    color: [0, 255, 200]
  , text: "CUSTOM"
};

Debug.log("This is a custom message type", "myType");

How to contribute

  1. File an issue in the repository, using the bug tracker, describing the contribution you'd like to make. This will help us to get you started on the right foot.
  2. Fork the project in your account and create a new branch: your-great-feature.
  3. Commit your changes in that branch.
  4. Open a pull request, and reference the initial issue in the pull request message.

Changelog

v0.1.1

  • Implemented log level

v0.1.0

  • Initial release

License

See the LICENSE file.

Keywords

FAQs

Last updated on 16 Jun 2014

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc