Skip to main content
Module

x/fun/decoder.ts>string

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

A Decoder that validates strings.

Examples

Example 1

import * as D from "./decoder.ts";

const result1 = D.string(null); // Left(DecodeError)
const result2 = D.string("Hello"); // Right("Hello")

type

Decoder<unknown, string>