Node CommonJS Example Library Template
If you want to make a new CommonJS module for Node, you can use the following as a template file (we’ll call this ‘detector.js’, but obviously you can name it whatever you want): “use strict”; let _ = require(‘lodash’); exports.functionA = (data) => { return data; }; exports.functionB = (data) => { return data; }; …