New: Introducing PHP and Composer Support.Read the Announcement
Socket
Book a DemoInstallSign in
Socket

call-log

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

call-log

Instrument an object or class so that anytime one of its method is invoked it gets logged to the console.

Source
npmnpm
Version
0.1.6
Version published
Weekly downloads
19
137.5%
Maintainers
1
Weekly downloads
 
Created
Source

call-log

Build Status

browser support

NPM

In Node.js, instrument an object or class so that anytime one of its methods is invoked it gets logged to the console.

Installation

npm install call-log

Usage

var callLog = require('call-log')

function Cat () {}
Cat.prototype.meow = function (sound) { return sound }
Cat.prototype.scratch = function () {}

Cat.static1 = function () {}

// Add instrumentation to Cat
callLog(Cat)

var cat = new Cat()
cat.meow()
cat.meow('MEOAAAAWWW!')

// Prints:
// "Called: meow()"
// "Called: meow(MEOAAAAWWW!)"

MIT License

Copyright (c) Feross Aboukhadijeh

Keywords

call log

FAQs

Package last updated on 29 Jan 2014

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