UNPKG

math-example_huntp

Version:

An example of creating a package

16 lines (13 loc) 364 B
var math_shared = require('./math_shared.js'); function add(x, y) { math_shared.binary_operation( x, y, function (_x, _y) { return _x + _y; }); } function subtract(x, y) { math_shared.binary_operation( x, y, function (_x, _y) { return _x - _y; }); } module.exports = { addition: add, subtraction: subtract }