-
-
Save davalapar/07acb79004cd4779ce04523001e5536f 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
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