@hono/zod-validator
Advanced tools
Comparing version 0.1.8 to 0.1.9
@@ -5,4 +5,4 @@ "use strict"; | ||
const validator_1 = require("hono/validator"); | ||
const zValidator = (target, schema, hook) => (0, validator_1.validator)(target, (value, c) => { | ||
const result = schema.safeParse(value); | ||
const zValidator = (target, schema, hook) => (0, validator_1.validator)(target, async (value, c) => { | ||
const result = await schema.safeParseAsync(value); | ||
if (hook) { | ||
@@ -9,0 +9,0 @@ const hookResult = hook({ data: value, ...result }, c); |
import { validator } from 'hono/validator'; | ||
export const zValidator = (target, schema, hook) => validator(target, (value, c) => { | ||
const result = schema.safeParse(value); | ||
export const zValidator = (target, schema, hook) => validator(target, async (value, c) => { | ||
const result = await schema.safeParseAsync(value); | ||
if (hook) { | ||
@@ -5,0 +5,0 @@ const hookResult = hook({ data: value, ...result }, c); |
{ | ||
"name": "@hono/zod-validator", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "Validator middleware using Zod", | ||
@@ -35,5 +35,5 @@ "main": "dist/cjs/index.js", | ||
"devDependencies": { | ||
"hono": "^3.1.0", | ||
"hono": "^3.5.2", | ||
"zod": "3.19.1" | ||
} | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4059