advice.js
function(base, after) {
            return Advice.around(base, function() {
                var args = [].slice.call(arguments, 0),
                    orig = args.shift(),
                    afterFn;

                // this is a separate statement for debugging purposes.
                var res = (orig.unbound || orig).apply(this, args);

                afterFn = (typeof after == 'function') ? after : after.obj[after.fnName];
                var result = afterFn.apply(this, args);
                return result;
            });
        }
function(base, after) {
            return Advice.around(base, function() {
                var args = [].slice.call(arguments, 0),
                    orig = args.shift(),
                    afterFn;

                // this is a separate statement for debugging purposes.
                var res = (orig.unbound || orig).apply(this, args);

                afterFn = (typeof after == 'function') ? after : after.obj[after.fnName];
                var result = afterFn.apply(this, args);
                return result;
            });
        }
function ( base , after ) { return Advice . around ( base , function ( ) { var args = [ ] . slice . call ( arguments , 0 ) , orig = args . shift ( ) , afterFn ; // this is a separate statement for debugging purposes. var res = ( orig . unbound || orig ) . apply ( this , args ) ; afterFn = ( typeof after == 'function' ) ? after : after . obj [ after . fnName ] ; var result = afterFn . apply ( this , args ) ; return result ; } ) ; }
#### after
will call the new function after the old one with same arguments
on the target object.
@param base {function} Base Function
@param after {function} Function to be called after base fn
@returns {function}
#### after will call the new function after the old one with same arguments on the target object .