Instantly share code, notes, and snippets.

Embed
What would you like to do?
var originalFunction = function (...) { … };
var wrap = function () {
// do something
var result = originalFunction.apply(this, arguments);
// do something else
Return result;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment