Skip to content

menewman/spy-master

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

SpyMaster

This is a simple utility to wrap each function on an object and log when that function is called.

To use this function, simply call SpyMaster.infiltrate:

SpyMaster.infiltrate(obj, tag);

Use the infiltrate method to wrap each function of an instance and its immediate prototype. (Note that this won't work well if you're using inheritance and need to spy on methods more than one layer deep in the prototype chain.) Pass the object to be infiltrated as the first parameter, and optionally pass a tag that will used as a prefix when logging function calls to the console.

About

SpyMaster - wraps each function on an object and logs when that function is called

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors