luhn-generator
Version:
A generator of numbers that passes the validation of Luhn algorithm or Luhn formula, also known as the 'modulus 10' or 'mod 10' algorithm
22 lines (17 loc) • 368 B
JavaScript
class Async {
run (executors) {
const args = Array.from(arguments).slice(1)
return new Promise(resolve => resolve(executors.async.apply(null, args)))
}
all (arr) {
return Promise.all(arr)
}
returns (value) {
return Promise.resolve(value)
}
throws (reason) {
return Promise.reject(reason)
}
}
module.exports = Async