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

@pipeletteio/debug

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pipeletteio/debug

A simple debug module

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

@pipeletteio/debug

A simple debug module

Installation

npm install @pipeletteio/debug

Example

const { debug, Debug } = require('@pipeletteio/debug');

// Create a dedicated debugger.
const dedicatedDebug = new Debug('myDedicatedDebugName', { useNewMeter: true });

debug.title('title');
debug.question('question');
dedicatedDebug.done('done');

setTimeout(() => {
  debug.valid('valid');
  debug.invalid('invalid');
  dedicatedDebug.done('fail');
}, 500);

// -- Outputs:
// ❱ title +4ms
// ❓ question +2ms
// [myDedicatedDebugName] done +2ms
// ✔ valid +502ms
// ✗ invalid +1ms
// [myDedicatedDebugName] fail +503ms

API

The methods of Console.prototype are exposed to Debug instance.

Debug.prototype.fail

Write a formatted message to stderr.

argumenttypedetails
argstringThe message.

Return void.

Debug.prototype.done

Write a formatted message to stdout.

argumenttypedetails
argstringThe message.

Return void.

Debug.prototype.invalid

Write a formatted message prefixed with an invalid check symbol to stderr.

argumenttypedetails
argstringThe message.

Return void.

Debug.prototype.valid

Write a formatted message prefixed with a valid check symbol to stdout.

argumenttypedetails
argstringThe message.

Return void.

Debug.prototype.question

Write a formatted message prefixed with an interogation symbol to stdout.

argumenttypedetails
argstringThe message.

Return void.

Debug.prototype.title

Write a formatted message prefixed with a chevron symbol to stdout.

argumenttypedetails
argstringThe message.

Return void.

Debug.constructor

A Debug constructor that can be used to create dedicated debug.

argumenttypedetails
namestring or null or undefinedThe dedicated debug name (optional).
optionsobjectThe debug options (default = {}).
options.useNewMeterboolean or null or undefinedThe debug options (default = {}).

Return Debug instance.

Example:

new Debug('name', { useNewMeter: true });

Env variables:

All methods can be disabled using environment variables.

Importance order:

  1. PIPELETTEIO_DEBUG = (true | false)
  2. (DEBUG | NDEBUG | NODE_DEBUG) = (true | false)
  3. (CI | CONTINUOUS_INTEGRATION) != undefined
  4. NODE_ENV = (production | test)

FAQs

Package last updated on 18 Apr 2020

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