0.0.7 • Published 1 year ago

@imchhh/zod-class v0.0.7

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

zod-class

npm.io npm.io

Acknowledgements

This library was heavily inspired by the zod-class which made by @sam-goodwin. I took his implementation and just rewrote it into the code I needed for my purposes.

Installation

pnpm add @imchhh/zod-class

Example

import { ZodClass } from '@imchhh/zod-class';
import { z } from 'zod';

declare const unknownInput: unknown;

class User extends ZodClass({
  name: z.string(),
  age: z.number(),
}) {}

const user = User.parse(unknownInput);

License

MIT

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago