|
45 | 45 |
|
46 | 46 | #### Go to [zod.js.org](https://zod.js.org) >> -->
|
47 | 47 |
|
| 48 | +- [Table of contents](#table-of-contents) |
48 | 49 | - [Introduction](#introduction)
|
49 | 50 | - [Sponsors](#sponsors)
|
| 51 | + - [Gold](#gold) |
| 52 | + - [Silver](#silver) |
| 53 | + - [Bronze](#bronze) |
50 | 54 | - [Ecosystem](#ecosystem)
|
| 55 | + - [Resources](#resources) |
| 56 | + - [API libraries](#api-libraries) |
| 57 | + - [Form integrations](#form-integrations) |
| 58 | + - [Zod to X](#zod-to-x) |
| 59 | + - [X to Zod](#x-to-zod) |
| 60 | + - [Mocking](#mocking) |
| 61 | + - [Powered by Zod](#powered-by-zod) |
| 62 | + - [Utilities for Zod](#utilities-for-zod) |
51 | 63 | - [Installation](#installation)
|
52 | 64 | - [Requirements](#requirements)
|
53 |
| - - [Node/npm](#from-npm-nodebun) |
54 |
| - - [Deno](#from-denolandx-deno) |
| 65 | + - [From `npm` (Node/Bun)](#from-npm-nodebun) |
| 66 | + - [From `deno.land/x` (Deno)](#from-denolandx-deno) |
55 | 67 | - [Basic usage](#basic-usage)
|
56 | 68 | - [Primitives](#primitives)
|
57 | 69 | - [Coercion for primitives](#coercion-for-primitives)
|
58 | 70 | - [Literals](#literals)
|
59 | 71 | - [Strings](#strings)
|
60 |
| - - [Datetime](#iso-datetimes) |
61 |
| - - [IP](#ip-addresses) |
| 72 | + - [ISO datetimes](#iso-datetimes) |
| 73 | + - [IP addresses](#ip-addresses) |
62 | 74 | - [Numbers](#numbers)
|
63 | 75 | - [BigInts](#bigints)
|
64 | 76 | - [NaNs](#nans)
|
|
69 | 81 | - [Optionals](#optionals)
|
70 | 82 | - [Nullables](#nullables)
|
71 | 83 | - [Objects](#objects)
|
72 |
| - - [.shape](#shape) |
73 |
| - - [.keyof](#keyof) |
74 |
| - - [.extend](#extend) |
75 |
| - - [.merge](#merge) |
76 |
| - - [.pick/.omit](#pickomit) |
77 |
| - - [.partial](#partial) |
78 |
| - - [.deepPartial](#deepPartial) |
79 |
| - - [.passthrough](#passthrough) |
80 |
| - - [.strict](#strict) |
81 |
| - - [.strip](#strip) |
82 |
| - - [.catchall](#catchall) |
| 84 | + - [`.shape`](#shape) |
| 85 | + - [`.keyof`](#keyof) |
| 86 | + - [`.extend`](#extend) |
| 87 | + - [`.merge`](#merge) |
| 88 | + - [`.pick/.omit`](#pickomit) |
| 89 | + - [`.partial`](#partial) |
| 90 | + - [`.deepPartial`](#deeppartial) |
| 91 | + - [`.required`](#required) |
| 92 | + - [`.passthrough`](#passthrough) |
| 93 | + - [`.strict`](#strict) |
| 94 | + - [`.strip`](#strip) |
| 95 | + - [`.catchall`](#catchall) |
83 | 96 | - [Arrays](#arrays)
|
84 |
| - - [.element](#element) |
85 |
| - - [.nonempty](#nonempty) |
86 |
| - - [.min/.max/.length](#minmaxlength) |
| 97 | + - [`.element`](#element) |
| 98 | + - [`.nonempty`](#nonempty) |
| 99 | + - [`.min/.max/.length`](#minmaxlength) |
87 | 100 | - [Tuples](#tuples)
|
88 | 101 | - [Unions](#unions)
|
89 |
| -- [Discriminated Unions](#discriminated-unions) |
| 102 | +- [Discriminated unions](#discriminated-unions) |
90 | 103 | - [Records](#records)
|
| 104 | + - [Record key type](#record-key-type) |
91 | 105 | - [Maps](#maps)
|
92 | 106 | - [Sets](#sets)
|
93 | 107 | - [Intersections](#intersections)
|
94 | 108 | - [Recursive types](#recursive-types)
|
| 109 | + - [ZodType with ZodEffects](#zodtype-with-zodeffects) |
95 | 110 | - [JSON type](#json-type)
|
96 |
| - - [Cyclical data](#cyclical-objects) |
| 111 | + - [Cyclical objects](#cyclical-objects) |
97 | 112 | - [Promises](#promises)
|
98 | 113 | - [Instanceof](#instanceof)
|
99 | 114 | - [Functions](#functions)
|
100 | 115 | - [Preprocess](#preprocess)
|
101 |
| -- [Custom](#custom-schemas) |
| 116 | +- [Custom schemas](#custom-schemas) |
102 | 117 | - [Schema methods](#schema-methods)
|
103 |
| - - [.parse](#parse) |
104 |
| - - [.parseAsync](#parseasync) |
105 |
| - - [.safeParse](#safeparse) |
106 |
| - - [.safeParseAsync](#safeparseasync) |
107 |
| - - [.refine](#refine) |
108 |
| - - [.superRefine](#superRefine) |
109 |
| - - [.transform](#transform) |
110 |
| - - [.default](#default) |
111 |
| - - [.describe](#describe) |
112 |
| - - [.catch](#catch) |
113 |
| - - [.optional](#optional) |
114 |
| - - [.nullable](#nullable) |
115 |
| - - [.nullish](#nullish) |
116 |
| - - [.array](#array) |
117 |
| - - [.promise](#promise) |
118 |
| - - [.or](#or) |
119 |
| - - [.and](#and) |
120 |
| - - [.brand](#brand) |
121 |
| - - [.pipe](#pipe) |
| 118 | + - [`.parse`](#parse) |
| 119 | + - [`.parseAsync`](#parseasync) |
| 120 | + - [`.safeParse`](#safeparse) |
| 121 | + - [`.safeParseAsync`](#safeparseasync) |
| 122 | + - [`.refine`](#refine) |
| 123 | + - [Arguments](#arguments) |
| 124 | + - [Customize error path](#customize-error-path) |
| 125 | + - [Asynchronous refinements](#asynchronous-refinements) |
| 126 | + - [Relationship to transforms](#relationship-to-transforms) |
| 127 | + - [`.superRefine`](#superrefine) |
| 128 | + - [Abort early](#abort-early) |
| 129 | + - [Type refinements](#type-refinements) |
| 130 | + - [`.transform`](#transform) |
| 131 | + - [Chaining order](#chaining-order) |
| 132 | + - [Validating during transform](#validating-during-transform) |
| 133 | + - [Relationship to refinements](#relationship-to-refinements) |
| 134 | + - [Async transforms](#async-transforms) |
| 135 | + - [`.default`](#default) |
| 136 | + - [`.describe`](#describe) |
| 137 | + - [`.catch`](#catch) |
| 138 | + - [`.optional`](#optional) |
| 139 | + - [`.nullable`](#nullable) |
| 140 | + - [`.nullish`](#nullish) |
| 141 | + - [`.array`](#array) |
| 142 | + - [`.promise`](#promise) |
| 143 | + - [`.or`](#or) |
| 144 | + - [`.and`](#and) |
| 145 | + - [`.brand`](#brand) |
| 146 | + - [`.pipe()`](#pipe) |
| 147 | + - [You can use `.pipe()` to fix common issues with `z.coerce`.](#you-can-use-pipe-to-fix-common-issues-with-zcoerce) |
122 | 148 | - [Guides and concepts](#guides-and-concepts)
|
123 | 149 | - [Type inference](#type-inference)
|
124 | 150 | - [Writing generic functions](#writing-generic-functions)
|
| 151 | + - [Constraining allowable inputs](#constraining-allowable-inputs) |
125 | 152 | - [Error handling](#error-handling)
|
126 | 153 | - [Error formatting](#error-formatting)
|
127 | 154 | - [Comparison](#comparison)
|
128 | 155 | - [Joi](#joi)
|
129 | 156 | - [Yup](#yup)
|
130 | 157 | - [io-ts](#io-ts)
|
131 | 158 | - [Runtypes](#runtypes)
|
| 159 | + - [Ow](#ow) |
132 | 160 | - [Changelog](#changelog)
|
133 | 161 |
|
134 | 162 | <!-- **Zod 2 is coming! Follow [@colinhacks](https://twitter.com/colinhacks) to stay updated and discuss the future of Zod.** -->
|
@@ -386,17 +414,16 @@ Sponsorship at any level is appreciated and encouraged. For individual developer
|
386 | 414 | <a href="https://ill.inc/">ill.inc</a>
|
387 | 415 | <br />
|
388 | 416 | </td>
|
389 |
| - <!-- <td align="center"> |
390 |
| - <a href="https://www.avanawallet.com/"> |
391 |
| - <img src="https://avatars.githubusercontent.com/u/105452197?s=200&v=4" width="100px;" alt="Avana Wallet logo"/> |
| 417 | + <td align="center"> |
| 418 | + <a href="https://www.masterborn.com/career?utm_source=github&utm_medium=referral&utm_campaign=zodsponsoring"> |
| 419 | + <img src="https://avatars.githubusercontent.com/u/48984031?s=200&v=4" width="100px;" alt="MasterBorn logo"/> |
392 | 420 | </a>
|
393 | 421 | <br />
|
394 |
| - <b>Avana Wallet</b> |
| 422 | + <b>MasterBorn</b> |
395 | 423 | <br/>
|
396 |
| - <a href="https://www.avanawallet.com/">avanawallet.com</a><br/> |
397 |
| - <span>Solana non-custodial wallet</span> |
| 424 | + <a href="https://www.masterborn.com/career?utm_source=github&utm_medium=referral&utm_campaign=zodsponsoring">masterborn.com</a> |
398 | 425 | <br />
|
399 |
| - </td> --> |
| 426 | + </td> |
400 | 427 | </tr>
|
401 | 428 | </table>
|
402 | 429 |
|
@@ -462,7 +489,7 @@ There are a growing number of tools that are built atop or support Zod natively!
|
462 | 489 |
|
463 | 490 | - [`@anatine/zod-mock`](https://github.com/anatine/zod-plugins/tree/main/packages/zod-mock): Generate mock data from a Zod schema. Powered by [faker.js](https://github.com/faker-js/faker).
|
464 | 491 | - [`zod-mocking`](https://github.com/dipasqualew/zod-mocking): Generate mock data from your Zod schemas.
|
465 |
| -- [`zocker`](https://zocker.sigrist.dev): Generate plausible mock-data from your schemas. |
| 492 | +- [`zocker`](https://zocker.sigrist.dev): Generate plausible mock-data from your schemas. |
466 | 493 |
|
467 | 494 | #### Powered by Zod
|
468 | 495 |
|
|
0 commit comments