I am having an issue with Node.js and module.exports. I understand that module.exports is a call to return an object, that object having whatever p
module.exports
module.exports = Format;
This will return the Format constructor when you will require('./formatting')
Format
require('./formatting')
On the other hand the code below will return an instance of Format, which you can directly call methods on:
module.exports = new Format();