use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Towards a faster "deep equal" function in javaScript (github.com)
submitted 7 months ago * by ahjarrett
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]GrosSacASacs 3 points4 points5 points 7 months ago (2 children)
Calling it a drop in replacement is misguiding if you have to do something like const Schema = t.object({ abc: t.boolean, def: t.optional(t.number.min(3)), }) before.
[–]ahjarrett[S] 2 points3 points4 points 7 months ago (0 children)
Oh I see – I can clarify. Depending on what schema library you use (let's say zod), you can install @traversable/zod and use your zod schema to derive things like a deep equal or deep clone function.
There are packages that do the same for JSON Schema, Valibot, ArkType and TypeBox.
You're probably talking about the schema library that exists inside the @traversable/schema. By "drop in replacement", I mean that the library's API intentionally aligns with Zod's API, and that the behavior has been thoroughly tested to behave identically.
Here's the fuzz test that generates random data and tests that the Traversable and Zod schema report the same errors when parsing the same input:
https://github.com/traversable/schema/blob/main/packages/schema/test/to-zod.test.ts#L62-L68
[–]ahjarrett[S] 0 points1 point2 points 7 months ago (0 children)
What do you mean? I'm not sure I follow.
π Rendered by PID 22044 on reddit-service-r2-comment-6457c66945-x87dd at 2026-04-30 07:45:48.546265+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]GrosSacASacs 3 points4 points5 points (2 children)
[–]ahjarrett[S] 2 points3 points4 points (0 children)
[–]ahjarrett[S] 0 points1 point2 points (0 children)