async-add-numbers
v1.0.1
Published
Asynchronously add numbers, (probably not) as easy as can be
Downloads
12
Maintainers
Readme
async-add-numbers
Usage
Installation: npm i --save async-add-numbers
const addNumbers = require('async-add-numbers')
addNumbers(1, 2)
.then(answer => console.log(answer)); // 3
addNumbers(-1, -2)
.then(answer => console.log(answer)); // -3
addNumbers("a", -1)
.then(answer => console.log(answer))
.catch(error => console.error(error)); // Either 'a' or 'b' is not a number
| Be sure to check out our even more useful REST API at nmbr.dev | | --- |