Top "Promise" questions

Promises are a tactic for deferred computing, suitable for several styles of concurrency: thread and event loop concurrency for local computation, and both synchronous and asynchronous remote messaging.

What is the equivalent of Bluebird Promise.finally in native ES6 promises?

Bluebird offers a finally method that is being called whatever happens in your promise chain. I find it very handy …

javascript promise bluebird
How to block for a javascript promise and return the resolved result?

I am obviously misunderstanding something about either the way js promises are resolved or about the semantics of "return." I …

javascript asynchronous promise deferred
how to use Promise with express in node.js?

I am using Promise with Express. router.post('/Registration', function(req, res) { var Promise = require('promise'); var errorsArr = []; function …

node.js express mongoose promise synchronous
JavaScript array .reduce with async/await

Seem to be having some issues incorporating async/await with .reduce(), like so: const data = await bodies.reduce(async(accum, …

javascript promise async-await reduce ecmascript-next
How to debug javascript promises?

I am trying to understand how to debug asynchronous code that is based on promises. By Promises I mean ECMAScript 6 …

javascript promise es6-promise
Promise : then vs then + catch

Is there any difference between the 2 followings codes ? myPromise.then(function() { console.log('success'); }).catch(function() { console.log('error'); }); myPromise.…

javascript promise
Is it a good practice using Observable with async/await?

I am using angular 2 common http that return an Observable, but I face with a problem that my code likes …

javascript angular typescript promise observable
How to extract data out of a Promise

I have a promise that returns data and I want to save that in variables. Is this impossible in JavaScript …

javascript promise ecmascript-6 bluebird es6-promise
Get state of Angular deferred?

With jQuery deferreds I'm used to be able to check the current state like this: var defer = $.Deferred(); defer.state(); //…

jquery angularjs promise angular-promise
What is the difference between JavaScript promises and async await?

I have been using ECMAScript 6 and ECMAScript 7 features already (thanks to Babel) in my applications - both mobile and web. …

javascript asynchronous promise async-await