Promises based async math operations.
Stop writing archaic, boring code.
Why use native operators when you can use an npm package?
Why do synchronous arithmetic when you can do so asynchronously?
Why get guaranteed results when you can get the promise of one?
const { add } = require("async-math")
add(8, 4).then(function(sum) { console.log(sum) })
Console output should be 12
const { subtract } = require("async-math")
subtract(8, 4).then(function(difference) { console.log(difference) })
Console output should be 4
const { multiply } = require("async-math")
multiply(8, 4).then(function(product) { console.log(product) })
Console output should be 32
const { divide } = require("async-math")
divide(8, 4).then(function(quotient) { console.log(quotient) })
Console output should be 2
async-math
is released under the MIT License