Skip to main content
Module

x/pazza/mod.ts>hex

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

Parse a hexadecimal character.

hex()("5").output === "5";
hex()("a").output === "a";
hex()("A").output === "A";
hex("upper")("a").ok === false;
hex("lower")("A").ok === false;

Parameters

optional
hexCase: HexCase = [UNSUPPORTED]

Hexadecimal case. Default is "both".

Returns

IParser<Hexadecimal, ErrorKind.Hex | ErrorKind.UpperHex | ErrorKind.LowerHex, string>