Skip to main content
Module

x/pazza/mod.ts>char

Parser combinators library designed for Deno, but also works on browsers and Node.js.
Go to Latest
function char
import { char } from "https://deno.land/x/pazza@v0.3.0/mod.ts";

Parse a specified character.

When constructing the parser, if a non-single-character string passed, an error will be thrown.

char("a")("a").output === "a";
char("a")("b").ok === false;

Type Parameters

Char extends string

Parameters

char: Char

character to be parsed

Returns

IParser<Char, ErrorKind.Char, string>