Skip to main content
Module

x/fun/mod.ts>refinement.string

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.string
import { refinement } from "https://deno.land/x/fun@v.2.0.0-alpha.11/mod.ts";
const { string } = refinement;

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