UNPKG

dynamodb-toolbox

Version:

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

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