Skip to content

Instantly share code, notes, and snippets.

@Willmo36
Created August 24, 2016 18:18
Show Gist options
  • Select an option

  • Save Willmo36/13b1fb3fa8fa5b12ba8c396367da2946 to your computer and use it in GitHub Desktop.

Select an option

Save Willmo36/13b1fb3fa8fa5b12ba8c396367da2946 to your computer and use it in GitHub Desktop.
Wrap function call in a log
const logFn = R.curry((msg, fn) => {
return function () {
console.info("Calling " + msg, arguments);
const result = fn.apply(this, arguments);
console.info("Result " + msg, result);
return result;
}
});
console.logFn = logFn;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment