1.3.0 • Published 8 months ago

purify-ts-filter v1.3.0

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

purify-ts-filter

Provides a filter function as an addition to the purify-ts libraries List functions.

Returns all elements which satisfy a predicate. A more typesafe version of the already existing Array.prototype.filter Can be partially applied.

import { filter } from "purify-ts-filter";

const isEven = (n: number) => n % 2 === 0;
const numbers = [1, 2, 3, 4, 5, 6];
const evens = filter(isEven, numbers); // Just([2, 4, 6])
1.3.0

8 months ago

1.2.0

8 months ago

1.1.0

8 months ago

1.0.0

8 months ago