title: Execute batch of promise with Promise.allSettled()
body: <p>With node v10.15.1 I try to use <code>Promise.allSettled()</code> to executes batches of Promise but it throw me an error</p>
  
  <blockquote>
    <p>TypeError: Promise.allSettled is not a function</p>
  </blockquote>
  
  <p>Is <code>Promise.all()</code> returning a promise ?</p>
  
  <p>The <code>Main</code> function below return an object.
  Other functions use some Promises to create its "sub-object".</p>
  
  <p>Why I need "batch of promise" :
  To create a sub-object, all the required promises must be settled.
  But not all the sub-objects are needed in the "main object".</p>
  
  <pre class="lang-js prettyprint-override"><code>const path = require('path');
  const os = require('os');
  const si = require('systeminformation');
  
  function getFoo() {
    // all these promises have to be settled to construct the sub-object
    return Promise.all([si.system(), si.chassis()]).then(([system, chassis]) =&gt; {
      return { /* hidden for brevity : use system and chassis to return a single object */ };
    })
    .catch(ex =&gt; { /* hidden for brevity */ });
  }
  
  function getBar() {
    // all these promises have to be settled to construct the sub-object
    return Promise.all([si.osInfo(), si.uuid()]).then(([osInfo, uuid]) =&gt; {
      return { /* hidden for brevity : use osInfo and uuid to return a single object */ };
    })
    .catch(ex =&gt; { /* hidden for brevity */ });
  }
  
  function getBaz() {
    // all these promises have to be settled to construct the sub-object
    return Promise.all([os.networkInterfaces(), si.networkInterfaceDefault()]).then(([interfaces, defaultInterface]) =&gt; {
      return { /* hidden for brevity : use interfaces and defaultInterface to return a single object */ };
    })
    .catch(ex =&gt; { /* hidden for brevity */ });
  }
  
  function Main() {
    // some of these promises can be rejected
    Promise.allSettled([ getFoo(), getBar(), getBaz() ])
      .then(([foo, bar, baz]) =&gt; {
        return { foo, bar, baz }
      })
      .catch(ex =&gt; { /* hidden for brevity */ });
  }
  
  Main();
  </code></pre>
  
  <h3>One Example of expected object</h3>
  
  <pre class="lang-js prettyprint-override"><code>{
    foo: {
      prop: 'example',
      someOtherProps: 'We are there!'
    },
    baz: {
      test: 50
    }
  }
  </code></pre>