Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

promise.allsettled polyfill node

Promise.allSettled = function (promises) {
  let mappedPromises = promises.map((p) => {
    return p      
      .then((value) => {        
        return {          
          status: 'fulfilled',         
          value,        
        };      
      })      
      .catch((reason) => {        
        return {          
          status: 'rejected',        
          reason,        
        };      
      });  
    });  
  return Promise.all(mappedPromises);};
Comment

PREVIOUS NEXT
Code Example
Javascript :: alert and prompt in javascript 
Javascript :: [Error - 10:52:45 PM] Failed to load jshint library 
Javascript :: This is the RegEx for Roman numerals 
Javascript :: jquery find selected option by class 
Javascript :: javascript string includes substring 
Javascript :: get public url as laravel asset() in jquery 
Javascript :: typescript how to mode json files when compile 
Javascript :: discord.js remove reaction 
Javascript :: js export multiple functions 
Javascript :: error vuejs from chokidar enospc 
Javascript :: javascript check if file exists on server 
Javascript :: mongoose delete request 
Javascript :: createrouter vue history remove Hash 
Javascript :: Creating a Proxy Object 
Javascript :: append element in a div as first child 
Javascript :: remove duplicate json object from array javascript 
Javascript :: nodejs https server 
Javascript :: Angular version chrome console 
Javascript :: us phone number regex 
Javascript :: convert svg to base64 javascript 
Javascript :: useeffect skip first render 
Javascript :: ajax file upload from modal 
Javascript :: set header as json in laravel 
Javascript :: javascript last character 
Javascript :: how to debug jest test vscode 
Javascript :: google maps js remove google maps logo 
Javascript :: javascript set query parameter 
Javascript :: js window location relative path 
Javascript :: render react in blaze 
Javascript :: trigger input javascript 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =