advice.js
Simple AOP library for both Node.js and browsers.
{} // compose a new function which calls a function after base returnsvar fn = advice; var obj = {}; // redefine a method which calls a function after obj.foo returnsadvice;
Documentation
advice.before(base, fn)
advice.before(obj, method, fn)
advice.after(base, fn)
advice.after(obj, method, fn)
advice.around(base, fn)
advice.around(obj, method, fn)
License
MIT