Created
March 7, 2018 17:32
-
-
Save xalakox/d27622e1907c45f77b24849862afd90f to your computer and use it in GitHub Desktop.
promise time debug function
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 timePromise = (fn, fnName) => { | |
console.time(fnName) | |
return eval(fn).then((retval)=>{ | |
console.timeEnd(fnName) | |
return retval | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment