module.exports is mainly used for exporting functions or data from a Module. It is basically done using module.exports keyword. This can be now shortened and used.
So here we are sharing a sample shortened use of the module.exports for exporting.
Instead of the module.exports , just exports can be used now as a short version.
Eg:
exports.getDate = function(){
const today = new Date();
const options = {
weekday: "long",
day: "numeric",
month: "long"
};
return today.toLocaleDateString("en-US", options);
}