Skip to content

Instantly share code, notes, and snippets.

@pc035860
Created December 26, 2013 04:05
Show Gist options
  • Save pc035860/8129655 to your computer and use it in GitHub Desktop.
Save pc035860/8129655 to your computer and use it in GitHub Desktop.
javascript basic proxy function
/**
* Context and arguments proxy function
*
* @param {function} func the function
* @param {object} context the context
* @param {array} args arguments
* @return {function} proxied function
*/
function proxy(func, context, args) {
return function () {
return func.apply(context, args);
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment