Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

fork-join-deep

ystarlongzi34MIT1.2.0TypeScript support: included

fork-join-deep

Like RxJS forkJoin operator, but deep traversal of the source.

RxJS, forkJoin

readme

fork-join-deep

Like RxJS forkJoin operator, but deep traversal of the source.


Build Status codecov npm npm MIT license PRs Welcome

Installation

npm i --save fork-join-deep

Feature

1. Support primitive values. (codesandbox)

❌ forkJoin

forkJoin({
  a: 0,
}).subscribe((result) => {
  console.log(result);
  // ↓↓↓ output ↓↓↓
  // Error: You provided '0' where a stream was expected.
  // You can provide an Observable, Promise, Array, or Iterable.
});

✅ forkJoinDeep

forkJoinDeep({
  a: 0,
}).subscribe((result) => {
  console.log(result);
  // ↓↓↓ output ↓↓↓
  // {a: 0}
});

2. Support nested objects. (codesandbox)

❌ forkJoin

forkJoin({
  a: {
    a1: of(0),
  },
}).subscribe((result) => {
  console.log(result);
  // ↓↓↓ output ↓↓↓
  // Error: You provided '0' where a stream was expected.
  // You can provide an Observable, Promise, Array, or Iterable.
});

✅ forkJoinDeep

forkJoinDeep({
  a: {
    a1: of(0),
  },
}).subscribe((result) => {
  console.log(result);
  // ↓↓↓ output ↓↓↓
  // {a: a1: {0}}
});

3. Support Higher-order Observables. (codesandbox)

❌ forkJoin

forkJoin({
  a: of(of(0)),
}).subscribe((result) => {
  console.log(result);
  // ↓↓↓ output ↓↓↓
  // {a: Observable}
});

✅ forkJoinDeep

forkJoinDeep({
  a: of(of(0)),
}).subscribe((result) => {
  console.log(result);
  // ↓↓↓ output ↓↓↓
  // {a: 0}
});

LICENSE

MIT

changelog

Changelog

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

Generated by auto-changelog.

v1.2.0

v1.1.1

30 January 2021

  • chore: add generate changelog script 6732287
  • chore: release v1.1.1 2d04d07
  • chore: add types field 64029fb

v1.1.0

30 January 2021

v1.0.5

29 January 2021

1.0.4

29 January 2021

  • docs: update repo name #2
  • docs: add npm trends link #1
  • build: add release-it 85c84c4
  • chore: release 1.0.4 52b50e5

1.0.3

26 January 2021

1.0.2

26 January 2021

1.0.1

25 January 2021