import { satisfy } from "https://deno.land/x/pazza@v0.3.0/mod.ts";
Pick next character from input and pass it to provided predicate. If the predicate passes, return a successful parsing result with that character. If not, return a parsing error.
satisfy((char) => char === "a")("a").output === "a";
satisfy((char) => char === "a")("b").ok === false;
Pick next byte from input and pass it to provided predicate. If the predicate passes, return a successful parsing result with that byte. If not, return a parsing error.
satisfy((byte) => byte === 10)(Uint8Array.of(10)).output === 10;
satisfy((byte) => byte === 10)(Uint8Array.of(13)).ok === false;