UNPKG

dynamodb-toolbox

Version:

Lightweight and type-safe query builder for DynamoDB and TypeScript.

5 lines (4 loc) 318 B
import { z } from 'zod'; import { withValidate } from '../utils.js'; import { withDefault, withEncoding, withOptional } from './utils.js'; export const nullZodParser = (schema, options = {}) => withEncoding(schema, options, withDefault(schema, options, withOptional(schema, options, withValidate(schema, z.null()))));