promise.min.js
v10.0.2
Published
Promise a/Synchronous
Downloads
1
Readme
Promise a/Synchronous
const promise = require ("promise.min.js")
function test (timeout) {
var p = new promise.create (function (resolve, reject) { resolve ("test") }, timeout)
p.then (function (resolve) { console.log (resolve) })
p.end ()
}
test (3)
const promise = require ("promise.min.js")
function test (timeout) {
var p = new promise.create (function (resolve, reject) {}, timeout)
p.then (function (resolve) { console.log (resolve) })
p.catch (function (reject) { console.log (reject) })
p.end ()
}
test (3)