Skip to content

Instantly share code, notes, and snippets.

@preaction
Created October 8, 2010 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save preaction/617157 to your computer and use it in GitHub Desktop.
Save preaction/617157 to your computer and use it in GitHub Desktop.
var makeScopedFormatter = function ( scope, func ) {
return function() { func.apply( scope, arguments ) }
};
var formatter = makeScopedFormatter( this, this.formatSomething );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment