How to use the @most/core.mergeArray function in @most/core

To help you get started, we’ve selected a few @most/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github joshburgess / redux-most / src / combineEpics.ts View on Github external
const out = epic(actionsStream, middlewareApiOrStateStream)

    if (!out || !out.source) {
      const epicIdentifier = epic.name
        ? `named ${epic.name}`
        : `at index ${findIndex(epic, epicsArray)} of the passed in array`

      throw new TypeError(
        `All Epics in the array provided to combineEpics must return a stream. Check the return value of the Epic ${epicIdentifier}.`,
      )
    }

    return out
  }

  return mergeArray(map(callEpic, epicsArray))
}
github motorcyclejs / motorcyclejs / stream / src / combinators / switchMerge.ts View on Github external
      (streams) => streams.length === 0 ? just([]) : mergeArray(streams),
      streams$,