math.js
'use strict';
const Promise = require('bluebird');
module.exports = {
// example of a callback-only method
callbackSum: function(a, b, callback) {
if (typeof a !== 'number')
return callback(new Error('"a" must be a number'));
if (typeof b !== 'number...