-
-
Save dtmrc/7d93aae9c45caa1dd5c9cce79371fb99 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
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