pure-parse
Version:
Strongly typed validation library that decouples type aliases from validation logic
2 lines (1 loc) • 4.13 kB
JavaScript
import{lazy as e}from"./common/lazy.js";import{chain as a,map as m,parserFromGuard as p,recover as i}from"./parsers/Parser.js";import{array as u}from"./parsers/arrays.js";import{tuple as f}from"./parsers/tuples.js";import{object as d,objectCompiled as x,objectStrict as c,objectStrictCompiled as b}from"./parsers/object.js";import{oneOf as y}from"./parsers/oneOf.js";import{parseBigInt as j,parseBoolean as N,parseNull as S,parseNumber as C,parseString as g,parseSymbol as F,parseUndefined as O}from"./parsers/primitives.js";import{equals as B}from"./parsers/equals.js";import{nullable as h,optional as v,optionalNullable as w,undefineable as E}from"./parsers/optional.js";import{instanceOf as q}from"./parsers/instanceOf.js";import{parseNever as I}from"./parsers/never.js";import{parseUnknown as V}from"./parsers/unknown.js";import{withDefault as P}from"./parsers/withDefault.js";import{dictionary as H}from"./parsers/dictionary.js";import{parseNumberFromString as L}from"./parsers/parseNumberFromString.js";import{formatPath as T,formatResult as W}from"./parsers/formatting.js";import{failure as Y,isFailure as Z,isSuccess as _,propagateFailure as $,success as rr}from"./parsers/ParseResult.js";import{parseJson as er}from"./parsers/json.js";import{isArray as ar,isBigInt as mr,isBoolean as pr,isFunction as ir,isNonEmptyArray as nr,isNull as ur,isNumber as lr,isObject as fr,isString as sr,isSymbol as dr,isUndefined as xr}from"./guards/primitives.js";import{equalsGuard as br}from"./guards/equals.js";import{oneOfGuard as yr}from"./guards/oneOf.js";import{tupleGuard as jr}from"./guards/tuples.js";import{objectGuard as Sr,objectGuardCompiled as Cr}from"./guards/object.js";import{dictionaryGuard as Fr}from"./guards/dictionary.js";import{arrayGuard as Ar,nonEmptyArrayGuard as Br}from"./guards/arrays.js";import{nullableGuard as hr,optionalGuard as vr,optionalNullableGuard as wr,undefineableGuard as Er}from"./guards/optional.js";import{instanceOfGuard as qr}from"./guards/instanceOfGuard.js";import{isUnknown as Ir}from"./guards/unknown.js";import{isNever as Vr}from"./guards/never.js";import{isJsonValue as Pr}from"./guards/json.js";import{memo as Hr,memoizeValidatorConstructor as Kr}from"./memoization/memo.js";import{arrayMemo as Qr,dictionaryMemo as Tr,objectCompiledMemo as Wr,objectMemo as Xr,objectStrictCompiledMemo as Yr,objectStrictMemo as Zr,tupleMemo as _r,unionMemo as $r}from"./memoization/parsers.js";import{arrayGuardMemo as oo,dictionaryGuardMemo as eo,nonEmptyArrayGuardMemo as to,objectGuardCompiledMemo as ao,objectGuardMemo as mo,tupleGuardMemo as po,unionGuardMemo as io}from"./memoization/guards.js";export{u as array,Ar as arrayGuard,oo as arrayGuardMemo,Qr as arrayMemo,a as chain,H as dictionary,Fr as dictionaryGuard,eo as dictionaryGuardMemo,Tr as dictionaryMemo,B as equals,br as equalsGuard,Y as failure,T as formatPath,W as formatResult,q as instanceOf,qr as instanceOfGuard,ar as isArray,mr as isBigInt,pr as isBoolean,Z as isFailure,ir as isFunction,Pr as isJsonValue,Vr as isNever,nr as isNonEmptyArray,ur as isNull,lr as isNumber,fr as isObject,sr as isString,_ as isSuccess,dr as isSymbol,xr as isUndefined,Ir as isUnknown,e as lazy,m as map,Hr as memo,Kr as memoizeValidatorConstructor,Br as nonEmptyArrayGuard,to as nonEmptyArrayGuardMemo,h as nullable,hr as nullableGuard,d as object,x as objectCompiled,Wr as objectCompiledMemo,Sr as objectGuard,Cr as objectGuardCompiled,ao as objectGuardCompiledMemo,mo as objectGuardMemo,Xr as objectMemo,c as objectStrict,b as objectStrictCompiled,Yr as objectStrictCompiledMemo,Zr as objectStrictMemo,y as oneOf,yr as oneOfGuard,v as optional,vr as optionalGuard,w as optionalNullable,wr as optionalNullableGuard,j as parseBigInt,N as parseBoolean,er as parseJson,I as parseNever,S as parseNull,C as parseNumber,L as parseNumberFromString,g as parseString,F as parseSymbol,O as parseUndefined,V as parseUnknown,p as parserFromGuard,$ as propagateFailure,i as recover,rr as success,f as tuple,jr as tupleGuard,po as tupleGuardMemo,_r as tupleMemo,E as undefineable,Er as undefineableGuard,io as unionGuardMemo,$r as unionMemo,P as withDefault};