Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Instrument a JavaScript class (or object) so that anytime a method function is called it gets logged to the console.
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.travis.yml
LICENSE
README.md
img.jpg
index.js
package.json

README.md

call-log travis npm

Instrument a JavaScript class (or object) so that anytime a method function is called it gets logged to the console.

cat

browser support

install

npm install call-log

usage

var callLog = require('call-log')

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

// Add instrumentation to Cat
callLog(Cat)

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

// Prints:
// "called meow"
// "called meow", "MEOAAAAWWW!"

license

MIT. Copyright (c) Feross Aboukhadijeh

Something went wrong with that request. Please try again.