What is the syntax to export a function from a module in Node.js?
function foo() {}
function bar() {}
export foo; // I don't think this is valid?
export default bar;
What is the syntax to export a function from a module in Node.js?
function foo() {}
function bar() {}
export foo; // I don't think this is valid?
export default bar;
export function foo(){...};
Or, if the function has been declared earlier:
export {foo};
Reference: MDN export