A lightweight Promise and when() implementation, plus other async goodies.
Questions tagged [when-js]
62 questions
-1
votes
1 answer
Abort a promise chain without raising an error
Using When.js, we have a situation where we want to quietly abort a promise chain mid way, due to the user changing their mind. Our current method is to simply never resolve that step of the chain - effectively leaving the other promises "hanging".…

Steve Bennett
- 114,604
- 39
- 168
- 219
-1
votes
1 answer
Why does When.js promise.then skip a function?
Can someone explain why this prints in reverse order?
Code:
when('test')
.then(function() {console.log('should be first');})
.then(console.log('should be second'));
Output:
should be second
should be first
PS: I am using when.js version:…

Anastasios Andronidis
- 6,310
- 4
- 30
- 53