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

debugging

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

debugging

this.debugging = debug + callsites + derived namespacing

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

debugging NPM version Build Status Dependency Status Coverage percentage Greenkeeper badge

this.debugging = debug + callsites + derived namespacing

Installation

$ npm install --save debugging

Usage

'use strict';

var Debugging = require('debugging');

var debug = new Debugging('app');
debug('info');
// => app info

var debugAppAuth = debug.another('auth');
debugAppAuth('more info');
// => app:auth more info

(function someFunction() {
  debugAppAuth.source(debugAppAuth.callsites()[0], 'even more info');
  // => app:auth some-dir/some-file.js someFunction 14 even more info
})();

API

Debugging([namespace])

  • namespace

    Type String

    The initial namespace to be applied to the debug logger; the default is 'app'.

another(namespace) : Debugging

  • namespace

    Required Type String

    A namespace to be appended to the current debug namespace

source(callsite, [info])

Log with callsite details
  • callsite

    Required Type: Object

  • info

    Type: Any

License

ISC © Buster Collings

Keywords

FAQs

Package last updated on 02 Nov 2018

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