UNPKG

dk-test-npm-module

Version:

A test module to understand how npm modules are created

13 lines (10 loc) 281 B
exports.printMsg = function() { console.log("This is a message from the demo package"); }; exports.calcArea = function(width, height) { if (isNaN(width) || isNaN(height)) { console.log("Width and height must be numbers"); return null; } return width * height; };