UNPKG

ts-action-operators

Version:

TypeScript action operators for NgRx and redux-observable

5 lines (4 loc) 169 B
import { filter } from "rxjs/operators"; export function ofType(...creators) { return filter(({ type }) => creators.some((creator) => creator.type === type)); }