1.0.7 • Published 4 years ago

call-log v1.0.7

Weekly downloads
11
License
MIT
Repository
github
Last release
4 years ago

call-log travis npm downloads javascript style guide

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

cat

install

npm install call-log

This module works in the browser with browserify.

Note: If you're NOT using browserify, then use the included standalone file call-log.min.js. This exports a CallLog constructor on window.

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

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

6 years ago

1.0.4

8 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

11 years ago

0.1.0

11 years ago