@pesto-io/pesto-zod
Version:
Pesto module to intantiate zod schema from Typescript source code as string.
53 lines (32 loc) • 1.2 kB
Markdown

--


# Pesto Zod
The `pesto-zod` npm package contains `zod` related utilities that the pesto app uses.
One of the most important, is the `ZodSchemaParser`, which is able to read some source code providd as a simple string, and to instantiate a zod schema.
## How to Use
* first, install the package:
```bash
npm i @pesto-io/pesto-zod
# pnpm add @pesto-io/pesto-zod
```
* Then, in your code, you can:
```TypeScript
import { ZodSchemaParser } from "@pesto-io/pesto-zod"
```
## Contribute
Git clone the source, and:
* Install dependencies:
```bash
pnpm i
```
### Generate the docs
```bash
pnpm run gen:api-docs
```
#### The Astro docs (WIP)
```bash
pnpm run build:docs:astro
# pnpm run dev:docs:astro
```