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

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 Wait For The Return Of A Mongoose Search?

I created a CRUD with NodeJS / Mongoose, split the files in MVC style. In route example I show up b… Read more How To Wait For The Return Of A Mongoose Search?

Swap Order Of Arguments To "then" With Bluebird / Nodejs Promises

I have a function which asynchronously grabs a value from a server: var request = require('requ… Read more Swap Order Of Arguments To "then" With Bluebird / Nodejs Promises

Testing Rejected Promise In Mocha/chai

I have a class that rejects a promise: Sync.prototype.doCall = function(verb, method, data) { var… Read more Testing Rejected Promise In Mocha/chai

Catch Error Type In Bluebird Not Working

I have a custom error class: class NetworkError extends Error { constructor() { super('Ne… Read more Catch Error Type In Bluebird Not Working

Sequential Execution Of Promise

I have following promise functions implemented like return new Promise(function(resolve, reject) { … Read more Sequential Execution Of Promise