0.1.18 • Published 10 years ago
promise-q v0.1.18
jsTools: promise-q 
Installation
npm install promise-q --save
or
bower install promise-q --save
Usage
$q(function (resolve, reject) {
resolve('gogogo!');
})
.then(function (result) {
console.log('checkpoint 1', result);
throw 'whoops!';
})
.then(function (result) {
console.log('checkpoint 2', result);
},function (result) {
console.log('checkpoint 2.1', result);
return qPromise(function (resolve, reject) {
setTimeout(function () { resolve('all right!'); }, 400);
});
})
.then(function (result) {
console.log('checkpoint 3', result);
}, function (reason) {
console.log('checkpoint 3.1', reason);
})
;
output:
checkpoint 1 gogogo!
checkpoint 2.1 whoops!
# elapsed 400ms
checkpoint 3 all right!
0.1.18
10 years ago
0.1.17
10 years ago
0.1.16
10 years ago
0.1.15
10 years ago
0.1.14
10 years ago
0.1.13
10 years ago
0.1.12
10 years ago
0.1.11
10 years ago
0.1.10
10 years ago
0.1.9
10 years ago
0.1.8
10 years ago
0.1.7
10 years ago
0.1.6
10 years ago
0.1.5
10 years ago
0.1.4
10 years ago
0.1.3
10 years ago
0.1.2
10 years ago
0.1.1
10 years ago
0.1.0
10 years ago