Hyperlinkv0.8.0-beta.28

Filter

Filter.booleanconsteffect/Filter.ts:384
(input: unknown): Result.Result<boolean, unknown>

A predefined filter that only passes through boolean values.

When to use

Use when accepting an unknown input only if it is already a boolean and you want a Filter result rather than a plain predicate result.

Details

Implemented with fromPredicate(Predicate.isBoolean), so true and false succeed and non-booleans fail with the original input.

Source effect/Filter.ts:3841 lines
export const boolean: Filter<unknown, boolean> = fromPredicate(Predicate.isBoolean)