1//In module
2exports.method = function() {};
3exports.otherMethod = function() {};
4// OR:
5module.exports = {
6 method: function() {},
7 otherMethod: function() {},
8};
9
10//In file that import functions from modules
11const myModule = require('./myModule.js');
12
13const method = myModule.method;
14const otherMethod = myModule.otherMethod;
15// OR:
16const {method, otherMethod} = require('./myModule.js');
17
1module.exports = function(firstParam) { console.log("You did it"); },
2module.exports = function(secondParam) { console.log("Yes you did it"); },
3// This may contain more functions