Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fun/decoder.ts>isWrap

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

A refinement that returns true when a DecodeError is a Wrap.

Examples

Example 1

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

const result1 = D.isWrap(D.wrapErr(
  "This is some context",
  D.leafErr(1, "expected string")
)); // true
const result2 = D.isWrap(D.manyErr()); // false