←back to thread

Zod v4 Beta

(v4.zod.dev)
175 points mycroft_4221 | 3 comments | | HN request time: 0.643s | source
1. adriancooney ◴[] No.43668711[source]
Zod is installed in nearly every project I use. It’s an essential part of my toolkit. I adore this library. It near perfect as-is and these additions make it even better. Thanks for all the hard work.
replies(1): >>43668826 #
2. iainmerrick ◴[] No.43668826[source]
I used to use Zod until I realised it’s rather big (for many projects this isn’t an issue at all, but for some it is). Now I use Valibot which is basically the same thing but nice and small. I do slightly prefer Zod’s API and documentation, though.

Edit to add: aha, now I read further in the announcement, looks like @zod/mini may catch up with valibot -- it uses the same function-based design at least, so unused code can be stripped out.

replies(1): >>43671917 #
3. alecmev ◴[] No.43671917[source]
Though exciting, looks like there's still room for shrinkage, the linked article puts a bare-minimum gzipped @zod/mini at 1.88kb, while Valibot is at 0.71kb [1].

[1] https://github.com/anatoo/zod-vs-valibot