Last active
March 15, 2019 00:08
-
-
Save aweary/b82b9034bb7d22fef63ec25f50ce8544 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
console.groupWithTrace = (name, fn) => { | |
console.group(name); | |
fn(); | |
console.groupCollapsed(); | |
console.trace(name); | |
console.groupEnd(); | |
console.groupEnd(); | |
}; | |
function add(x, y) { | |
console.groupWithTrace("add", () => { | |
console.log({ x, y }); | |
}); | |
return x + y; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment