Convert a JS file to a node.js or CommonJS module by changing functions into export declerations