@lambda-func/zod
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

@lambda-func/zod

https://img.shields.io/npm/v/@lambda-func/zod

npm i @lambda-func/zod

This package contains a middleware to use zod for type parsing.

Usage

import { z } from 'zod'
import { zodParser } from '@lambda-func/zod'

const Request = z.object({
  name: z.string()
})

// will throw an error if not value Request
export const handler = zodParser(Request)(async (event) => {
  return event.name
})

Readme

Keywords

none

Package Sidebar

Install

npm i @lambda-func/zod

Weekly Downloads

0

Version

0.0.2

License

ISC

Unpacked Size

3.31 kB

Total Files

6

Last publish

Collaborators

  • cgiles95