Top "Q" questions

The Q.js JavaScript promise library.

What's the difference between returning value or Promise.resolve from then()

What is the difference between: and this: new Promise(function(res, rej) { res("aaa"); }) .then(function(result) { return Promise.resolve("…

javascript angularjs promise q
Resolve promises one after another (i.e. in sequence)?

Consider the following code that reads an array of files in a serial/sequential manner. readFiles returns a promise, which …

javascript promise q sequential serial-processing
Angularjs $q.all

I have implemented the $q.all in angularjs, but I can not make the code work. Here is my code : …

angularjs promise q
How do I tell if an object is a Promise?

Whether it's an ES6 Promise or a bluebird Promise, Q Promise, etc. How do I test to see if a …

javascript promise q bluebird es6-promise
return value after a promise

I have a javascript function where I want to return the value that I get after the return method. Easier …

javascript node.js promise q
How do you properly return multiple values from a promise?

I've recently run into a certain situation a couple of times, which I didn't know how to solve properly. Assume …

javascript promise q
Aren't promises just callbacks?

I've been developing JavaScript for a few years and I don't understand the fuss about promises at all. It seems …

javascript callback promise q bluebird
Replacing callbacks with promises in Node.js

I have a simple node module which connects to a database and has several functions to receive data, for example …

javascript node.js promise q bluebird
Rendering React components with promises inside the render method

I have a component which gets a collection of items as props and maps them to a collection of components …

javascript reactjs q
What is the explicit promise construction antipattern and how do I avoid it?

I was writing code that does something that looks like: function getStuffDone(param) { | function getStuffDone(param) { var d = Q.defer(); /* …

javascript promise q bluebird es6-promise