Created
June 6, 2019 22:15
-
-
Save aleclarson/90deca3d9114cb5a7a91dcdced633a6e to your computer and use it in GitHub Desktop.
This file contains 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
const debug = (name, val) => { | |
console.log(name, val) | |
return val | |
} | |
const debugFn = (name, fn) => { | |
return (...args) => { | |
console.log(name + ':arguments %O', args) | |
const result = fn(...args) | |
console.log(name + ':return %O', result) | |
return result | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment