Skip to content Skip to sidebar Skip to footer
Showing posts with the label Bluebird

Promises With Fs And Bluebird

I'm currently learning how to use promises in nodejs so my first challenge was to list files in… Read more Promises With Fs And Bluebird

What Does Compound Let/const Assignment Mean?

There is an article Optimization killers in wiki of Bluebird library. In this article there is a ph… Read more What Does Compound Let/const Assignment Mean?

Run Bluebird Promises Sequentially, Without Return Values?

This question has been asked in a variety of ways, but not quite as simply. How would this Promise.… Read more Run Bluebird Promises Sequentially, Without Return Values?

A Promise Was Created In A Handler But Was Not Returned From It

I've just started using bluebird promises and am getting a confusing error Code Abstract var … Read more A Promise Was Created In A Handler But Was Not Returned From It

How To Turn Nested Callback Into Promise?

Recently I started using pg-promise with bluebird library. I have always been nesting callback and … Read more How To Turn Nested Callback Into Promise?

How To Promisify?

I have this sort of function: someFunction.someMethod('param1', function(err, res1, res2) {… Read more How To Promisify?

Wait For Promises From A For Loop

The following code does not really do what I want. function doIt () { return new Promise (functio… Read more Wait For Promises From A For Loop

Combining Promises And Chaining

Is there a good design pattern for utilizing promises, while still supporting chaining? For example… Read more Combining Promises And Chaining

Cannot Read Property Of Undefined After Promise.promisify

let nasPath = ''; return getFamInfo(args.familyID) .then(function (famInfo) { n… Read more Cannot Read Property Of Undefined After Promise.promisify

Catching Errors Generated In Promises Within Promises In Javascript

Is it possible to have errors bubble up in Promises? See the code below for reference, I'd like… Read more Catching Errors Generated In Promises Within Promises In Javascript

Bluebird's Promise.settle Doesn't Resolve With The Correct Values

I have the following code: return Promise.settle(matches, imgur.uploadUrl) .map(function (inspe… Read more Bluebird's Promise.settle Doesn't Resolve With The Correct Values

Typescript Use Dynamic Import In Es5 With Bluebird

I'm trying to use the new dynamic import() function in TypeScript, but I get the following erro… Read more Typescript Use Dynamic Import In Es5 With Bluebird

Can't Apply Lodash Partial To Function Created With Bluebird Promisifyall

The below code takes a all the methods in object lib and promisify's them. Then I can use the c… Read more Can't Apply Lodash Partial To Function Created With Bluebird Promisifyall

Best Way To Handle Early Returns In Chains Of Promises?

What's the best way to handle early returns in Bluebird without throwing an error. For example,… Read more Best Way To Handle Early Returns In Chains Of Promises?