Analog of Promise.allSettled() in RxJS
npm install fork-join-settledforkJoin when I need to make an parallel requests. But it throws an error if any given observable throws an error at some point. In rare cases I want to get some partial results from requests (at least results that were completed successfully). Unfortunatly, it's imposible with forkJoin.
Promise.allSettled() static method. But I like RxJS and don't want to use Promises in my, for example Angular projects. That's how idea of this library was born.
R is an array of objects that describe the outcome of each observable (in the same order they were passed); each object has following properties:
forkJoin operator will completed with error if any of given observables throws an error. forkJoin Settled will never completed with error. It maps an error to object with "rejected" status. Value from observable it maps to object with "fulfilled" status.
bash
npm i fork-join-settled
`
2. Import to your file:
`ts
import { forkJoinSettled } from 'fork-join-settled';
`
3. Use wherever you need:
`ts
forkJoinSettled([...])
`
You can look up in test file ./src/fork-join-settled.spec.ts` to see how to use operator.