@valivali/zod
v1.0.0
Published
ValiVali Resolver for zod.
Downloads
3
Maintainers
Readme
@valivali/zod
ValiVali Resolver for zod.
🚀 Installation
$ npm install @valivali/core @valivali/zod zod
👏 Getting Started
The following is a simple usage example.
import { valivali } from '@valivali/core';
import { zodResolver } from '@valivali/zod';
// It is also possible to import with the following aliases.
// import { resolver } from '@valivali/zod';
import { z } from 'zod';
const schema = z.object({
id: z.string(),
name: z.string(),
});
const value = {
id: 'id',
name: 'name',
};
const validatedValue = valivali(zodResolver(schema), value);
🤝 Contributing
Contributions, issues and feature requests are welcome.
Feel free to check issues page if you want to contribute.
📝 License
Copyright © 2020 @Karibash.
This project is MIT
licensed.