@numeric-io/zod
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

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.

Package Sidebar

Install

npm i @numeric-io/zod

Weekly Downloads

82

Version

2.0.1

License

MIT

Unpacked Size

549 kB

Total Files

52

Last publish

Collaborators

  • justinpchang
  • dannynumeric
  • andrew-numeric
  • numeric-package-importer