Created by Thomas Laforge
import { filterArray } from 'ngxtension/filter-array';
Apply a filtering function to an array emitted by an Observable.
import { of } from 'rxjs';import { filterArray } from 'ngxtension/filter-array'; const source$ = of([1, 2, 3]);const filtered$ = source$.pipe(filterArray((element) => element <= 2));
const source$ = of([1, 2, 3, 4, 5]);const filtered$ = source$.pipe(filterArray((element) => element % 2 === 0));
filterFn: (item: T, index: number) => boolean
.filter()