Skip to main content
Module

x/fun/refinement.ts>string

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

An instance of Refinement<unknown, string>.

Examples

Example 1

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

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

Parameters

a: unknown

Returns

a is string