1.0.2 • Published 8 years ago

method-interceptor v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
8 years ago

Installation

npm install method-interceptor

Usage

intercept = require('method-interceptor');
var obj = { };
intercept(obj, function(method) {}, function(method) {});
  • The 1st parameter is the object whose function calls you want to intercept
  • The 2nd parameter is the function you'd like to call before the actual function is called
  • The 3rd paramter is the function that gets called after the actual function is called
  • Method obj contains .name, .args, .res
1.0.2

8 years ago

1.0.1

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago