A lot of times I see node modules where they'll do "function stdioTransport() {" and stdioTransport.prototype.whatever, then at the bottom do module.exports = stdioTransport; It makes the code a tiny bit less confusing, but it's your preference.