import functionName from "../lib/index.js"; function foo () {} console.log(functionName(foo)); // => foo