frankiehayward
12/5/2019 - 10:35 PM

functionName

This snippet prints the name of a function into the console.

const functionName = fn => (console.debug(fn.name), fn);

functionName(Math.max); // max (logged in debug channel of console)