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

simple-debugger

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-debugger

tool for debugging events, and methods of your classes

  • 2.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
38
decreased by-51.28%
Maintainers
1
Weekly downloads
 
Created
Source

simple-debugger

npm i simple-debugger 
var debugEvents = require('simple-debugger').debugEvents
var debugMethods = require('simple-debugger').debugMethods

var EventEmitter = require('events')
var inherits = require('util').inherits

inherits(SomeClass, EventEmitter)
function SomeClass() {
    debugEvents(this)
    debugMethods(this, [ 'on', 'once', 'emit' ])
    this.init()
}

SomeClass.prototype.init = function() {
    //...
    this.emit('inited')
}

new SomeClass()

/*
    $ DEBUG=* node .
      debugMethods:SomeClass #init +0ms
      debugEvents:SomeClass !inited +2ms
*/

var debugEvents = require('simple-debugger').debugEvents
var debugMethods = require('simple-debugger').debugMethods

var request = require('request')
var google = request('https://google.com')

debugEvents(google, [], 'google')
debugMethods(google, [ 'on', 'once', 'emit' ], 'google')

Keywords

FAQs

Package last updated on 19 Oct 2019

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