Skip to content

Instantly share code, notes, and snippets.

@xalakox
Created March 7, 2018 17:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xalakox/d27622e1907c45f77b24849862afd90f to your computer and use it in GitHub Desktop.
Save xalakox/d27622e1907c45f77b24849862afd90f to your computer and use it in GitHub Desktop.
promise time debug function
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