Skip to main content
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.
Go to Latest
function refinement.boolean
import { refinement } from "https://deno.land/x/fun@v.2.0.0-alpha.11/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