Created
October 20, 2016 00:56
-
-
Save jlfwong/5c500f9ed4cfe1789d9416cf0a87803c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Handy for debugging sometimes | |
function tap(fn) { | |
return function() { | |
const result = fn.apply(this, arguments); | |
console.log(Array.prototype.slice.call(arguments), '->', result); | |
return result; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment