Node.JS export function without object wrapper Node.JS export function without object wrapper node.js node.js

Node.JS export function without object wrapper


You need to overwrite it as

module.exports = function() {}

Merely writing exports = function() {} creates a new local variables called exports and hides the exports variable living in module.exports