1.0.2 • Published 8 months ago

rx-filternil v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

FilterNil

A utility function for filtering out null and undefined values from RxJS streams or arrays.

Installation

Install via npm:

npm install rx-filternil

Usage

filterNil is a function that removes null and undefined values from a data stream or array using RxJS operators.

Example

import { of } from 'rxjs';
import { filterNil } from 'rx-filternil';

of(null, 1, undefined, 2, 3)
    .pipe(filterNil())
    .subscribe(console.log); // Outputs: 1, 2, 3

API

filterNil

A function that filters out null and undefined values. This function can be used in any RxJS pipeline to clean up data streams.

  • Returns: Function - A function that filters out null and undefined values.

Testing

To run tests using Brittle:

npm test

License

This project is licensed under the MIT License.

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago