$
This commit is contained in:
21
node_modules/release-zalgo/lib/Async.js
generated
vendored
Normal file
21
node_modules/release-zalgo/lib/Async.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
'use strict'
|
||||
|
||||
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
|
Reference in New Issue
Block a user