I had a look at the bluebird promise FAQ, in which it mentions that .then(success, fail) is an antipattern. I don’t quite understand its explanation as for the try...
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by...
Whether it’s an ES6 Promise or a bluebird Promise, Q Promise, etc. How do I test to see if a given object is a Promise? 19 Answers 19
I’ve been developing JavaScript for a few years and I don’t understand the fuss about promises at all. It seems like all I do is change: api(function(result){ api2(function(result2){ api3(function(result3){...
I was writing code that does something that looks like: function getStuffDone(param) { | function getStuffDone(param) { var d = Q.defer(); /* or $q.defer */ | return new Promise(function(resolve,...
I have restructured my code to promises, and built a wonderful long flat promise chain, consisting of multiple .then() callbacks. In the end I want to return some composite...
I want to work with promises but I have a callback API in a format like: 1. DOM load or other one time event: window.onload; // set to callback...