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

Converting Observable To Promise

Is it a good practice to convert the observable object to a promise since observable can be used in… Read more Converting Observable To Promise

How To Correctly Resolve A Promise Within Promise Constructor

const setTimeoutProm = (delay) => new Promise(res => setTimeout(() => res(delay),delay)) … Read more How To Correctly Resolve A Promise Within Promise Constructor

I Broke My Promise

So.. I'm having the hardest time learning how to Promise. I'm using bluebird (https://githu… Read more I Broke My Promise

Parse Promise Returns Empty Object

I'm iterating an array, but with each iteration, I'm calling an async method. Here is the … Read more Parse Promise Returns Empty Object

Cannot Resolve Promise In Object

I'm trying to fetch file and return promise in one method of object and then use this data insi… Read more Cannot Resolve Promise In Object

How To Cancel Timeout Inside Of Javascript Promise?

I'm toying with promises in JavaScript and tried to promisify setTimeout function: function tim… Read more How To Cancel Timeout Inside Of Javascript Promise?

Axios Interceptors Retry Original Request And Access Original Promise

I have an interceptor in place to catch 401 errors if the access token expires. If it expires it tr… Read more Axios Interceptors Retry Original Request And Access Original Promise

Asyncstorage.getitem Returning Promise

So I am trying to get data with AsyncStorage.getItem and then pass it to a function in React-native… Read more Asyncstorage.getitem Returning Promise

How To List All Promisses

I am reading Promise.all() guide but not seems what I need, I need to do something as console.log(P… Read more How To List All Promisses

Why Does Using Async-await In Map Function Still Return Promises And Not The Resolved Values?

I have an API call to an array of links and I want to use a map function to save al the responses c… Read more Why Does Using Async-await In Map Function Still Return Promises And Not The Resolved Values?

Firebase Functions - Admin.messaging().sendtotopic Executes But Never Makes It To The `then` Block

For some reason the then block of an admin function doesn't seem to be executing - I don't … Read more Firebase Functions - Admin.messaging().sendtotopic Executes But Never Makes It To The `then` Block

Node.js Resolve Promise And Return Value

I use the Microsoft bot framework to come up with a 'simple' PoC bot. I used a tutorial as … Read more Node.js Resolve Promise And Return Value

What Is The Benefit Of A 'promise' Abstraction In Commonjs?

I'm reading this article and the section on the promise abstraction seems a little overly compl… Read more What Is The Benefit Of A 'promise' Abstraction In Commonjs?

Promise Cancellation Still Firing Fulfill Function

This is my code: var promiseResult = new BBpromise(function(resolve, reject){ console.log(1) … Read more Promise Cancellation Still Firing Fulfill Function

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

Promise Retry Pattern Memory Footprint

Consider a function to make a HTTP request until it succeeds: function fetch_retry(url) { retur… Read more Promise Retry Pattern Memory Footprint

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

How To Make Synchronous Http Calls Using Promises In Node.js

I would like to iterate thru an array of students and make http call for each of them and parse the… Read more How To Make Synchronous Http Calls Using Promises In Node.js

Waiting For Promises To Resolve Within An Array

With an Array of Promises how do I wait until they have all resolved before proceeding? Below is an… Read more Waiting For Promises To Resolve Within An Array

How To Call A Function With A Promise

I'm fairly new to JS and I'm trying to understand the documentation in a npm package. The … Read more How To Call A Function With A Promise