@quentinadam/zod
v0.1.3
Published
A simple library to parse data, inspired by zod
Downloads
199
Readme
@quentinadam/zod
A simple library to parse data, inspired by https://zod.dev/.
Usage
import * as z from '@quentinadam/zod';
const data: unknown = { age: 30, name: 'John', email: '[email protected]' };
const schema: z.Schema<{ age: number; name: string }> = z.object({ age: z.number(), name: z.string() });
const parsed: { age: number; name: string } = schema.parse(data);