Created by Thomas Laforge
import { filterNil } from 'ngxtension/filter-nil';
Filter out undefined and null values from an Observable stream.
undefined
null
import { of } from 'rxjs';import { filterNil } from 'ngxtension/filter-nil'; const source$ = of(undefined, null, 1, undefined);const filtered$ = source$.pipe(filterNil());
const source$ = of(undefined, null, 1, 2, null);const filtered$ = source$.pipe(filterNil());// Output: 1, 2
No inputs needed for this operator.