pure-parse
Version:
Strongly typed validation library that decouples type aliases from validation logic
2 lines (1 loc) • 424 B
JavaScript
import{success as t,failure as p}from"./ParseResult.js";import{parseUndefined as r,parseNull as n}from"./primitives.js";import{oneOf as e}from"./oneOf.js";import{propertyAbsent as l,omitProperty as s}from"../internals/optionalSymbol.js";const i=o=>e(a,r,o),a=o=>o===l?t(s):p("Expected property to be present"),m=o=>e(n,o),d=o=>e(r,o),y=o=>i(m(o));export{m as nullable,i as optional,y as optionalNullable,d as undefineable};