Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fun/mod.ts>refinement.boolean

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
function refinement.boolean
import { refinement } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { boolean } = refinement;

An instance of Refinement<unknown, boolean>.

Examples

Example 1

import * as R from "./refinement.ts";

const result1 = R.boolean(null); // false
const result2 = R.boolean(true); // true, a variable is now typed as true

Parameters

a: unknown

Returns

a is boolean