Skip to content

Instantly share code, notes, and snippets.

@chakrit
Created May 27, 2015 05:41
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 chakrit/f704a48644864d9465bc to your computer and use it in GitHub Desktop.
Save chakrit/f704a48644864d9465bc to your computer and use it in GitHub Desktop.
var _ = require('underscore');
function dud() { }
var result = _.wrap(dud, function(wrapped) {
console.log(arguments);
return 'result';
})('one', 'two', 'three');
console.log(result);
// prints:
// { '0': [Function: dud], '1': 'one', '2': 'two', '3': 'three' }
// result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment