Skip to content
/ zod Public
forked from colinhacks/zod

TypeScript-first schema validation with static type inference

License

Notifications You must be signed in to change notification settings

numeric-io/zod

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zod (Numeric fork)

This fork does not deep copy objects and records when parsing. This speeds parsing up by quite a bit (around 2x on standard use cases for our app). For strict and strip parsing, the extra keys are just deleted from the input object.

Because of this, I also removed the following features which did not make sense when the input data is mutable:

  • catch
  • coerce
  • default
  • intersection/and (in favor of merge)
  • pipe
  • preprocess
  • transform

I've kept refinements in for now, since they don't affect anything. But I do hate them.

All tests have been updated and pass.

About

TypeScript-first schema validation with static type inference

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 95.9%
  • JavaScript 2.1%
  • HTML 2.0%