Skip to content

Commit 1ecd624

Browse files
committedAug 6, 2023
Fix prettier
1 parent 78a4090 commit 1ecd624

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed
 

‎README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -1270,10 +1270,12 @@ Contrary to the `.partial` method, the `.required` method makes all properties r
12701270
Starting from this object:
12711271

12721272
```ts
1273-
const user = z.object({
1274-
email: z.string(),
1275-
username: z.string(),
1276-
}).partial();
1273+
const user = z
1274+
.object({
1275+
email: z.string(),
1276+
username: z.string(),
1277+
})
1278+
.partial();
12771279
// { email?: string | undefined; username?: string | undefined }
12781280
```
12791281

‎deno/lib/README.md

+13-9
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ There are a growing number of tools that are built atop or support Zod natively!
460460

461461
#### Form integrations
462462

463+
- [`conform`](https://conform.guide/api/zod): A progressive enhancement first form validation library for Remix and React Router
463464
- [`react-hook-form`](https://github.com/react-hook-form/resolvers#zod): A first-party Zod resolver for React Hook Form.
464465
- [`zod-validation-error`](https://github.com/causaly/zod-validation-error): Generate user-friendly error messages from `ZodError`s.
465466
- [`zod-formik-adapter`](https://github.com/robertLichtnow/zod-formik-adapter): A community-maintained Formik adapter for Zod.
@@ -471,7 +472,8 @@ There are a growing number of tools that are built atop or support Zod natively!
471472
- [`@modular-forms/solid`](https://github.com/fabian-hiller/modular-forms): Modular form library for SolidJS that supports Zod for validation.
472473
- [`houseform`](https://github.com/crutchcorn/houseform/): A React form library that uses Zod for validation.
473474
- [`sveltekit-superforms`](https://github.com/ciscoheat/sveltekit-superforms): Supercharged form library for SvelteKit with Zod validation.
474-
- [`mobx-zod-form`](https://github.com/MonoidDev/mobx-zod-form): Data-first form builder based on MobX & Zod
475+
- [`mobx-zod-form`](https://github.com/MonoidDev/mobx-zod-form): Data-first form builder based on MobX & Zod.
476+
- [`@vee-validate/zod`](https://github.com/logaretm/vee-validate/tree/main/packages/zod): Form library for Vue.js with Zod schema validation.
475477

476478
#### Zod to X
477479

@@ -483,7 +485,8 @@ There are a growing number of tools that are built atop or support Zod natively!
483485
- [`fastify-type-provider-zod`](https://github.com/turkerdev/fastify-type-provider-zod): Create Fastify type providers from Zod schemas.
484486
- [`zod-to-openapi`](https://github.com/asteasolutions/zod-to-openapi): Generate full OpenAPI (Swagger) docs from Zod, including schemas, endpoints & parameters.
485487
- [`nestjs-graphql-zod`](https://github.com/incetarik/nestjs-graphql-zod): Generates NestJS GraphQL model classes from Zod schemas. Provides GraphQL method decorators working with Zod schemas.
486-
- [`zod-openapi`](https://github.com/samchungy/zod-openapi): Create full OpenAPI v3.x documentation from Zod Schemas.
488+
- [`zod-openapi`](https://github.com/samchungy/zod-openapi): Create full OpenAPI v3.x documentation from Zod schemas.
489+
- [`fastify-zod-openapi`](https://github.com/samchungy/fastify-zod-openapi): Fastify type provider, validation, serialization and @fastify/swagger support for Zod schemas.
487490

488491
#### X to Zod
489492

@@ -1203,7 +1206,7 @@ Starting from this object:
12031206

12041207
```ts
12051208
const user = z.object({
1206-
email: z.string()
1209+
email: z.string(),
12071210
username: z.string(),
12081211
});
12091212
// { email: string; username: string }
@@ -1267,10 +1270,12 @@ Contrary to the `.partial` method, the `.required` method makes all properties r
12671270
Starting from this object:
12681271

12691272
```ts
1270-
const user = z.object({
1271-
email: z.string()
1272-
username: z.string(),
1273-
}).partial();
1273+
const user = z
1274+
.object({
1275+
email: z.string(),
1276+
username: z.string(),
1277+
})
1278+
.partial();
12741279
// { email?: string | undefined; username?: string | undefined }
12751280
```
12761281

@@ -2724,7 +2729,6 @@ Yup is a full-featured library that was implemented first in vanilla JS, and lat
27242729

27252730
- Supports casting and transforms
27262731
- All object fields are optional by default
2727-
- Missing object methods: (partial, deepPartial)
27282732
<!-- - Missing nonempty arrays with proper typing (`[T, ...T[]]`) -->
27292733
- Missing promise schemas
27302734
- Missing function schemas
@@ -2787,7 +2791,7 @@ This more declarative API makes schema definitions vastly more concise.
27872791

27882792
[https://github.com/pelotom/runtypes](https://github.com/pelotom/runtypes)
27892793

2790-
Good type inference support, but limited options for object type masking (no `.pick` , `.omit` , `.extend` , etc.). No support for `Record` s (their `Record` is equivalent to Zod's `object` ). They DO support readonly types, which Zod does not.
2794+
Good type inference support. They DO support readonly types, which Zod does not.
27912795

27922796
- Supports "pattern matching": computed properties that distribute over unions
27932797
- Supports readonly types

0 commit comments

Comments
 (0)
Please sign in to comment.