@hono/zod-validator
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -8,3 +8,3 @@ "use strict"; | ||
if (hook) { | ||
const hookResult = hook(result, c); | ||
const hookResult = hook({ data: value, ...result }, c); | ||
if (hookResult instanceof Response || hookResult instanceof Promise) { | ||
@@ -11,0 +11,0 @@ return hookResult; |
@@ -9,2 +9,3 @@ import type { Context, MiddlewareHandler, Env, ValidationTargets } from 'hono'; | ||
error: ZodError; | ||
data: T; | ||
}, c: Context<E, P>) => Response | Promise<Response> | void | Promise<Response | void>; | ||
@@ -11,0 +12,0 @@ export declare const zValidator: <T extends z.ZodType<any, z.ZodTypeDef, any>, Target extends keyof ValidationTargets, E extends Env, P extends string, V extends { |
@@ -5,3 +5,3 @@ import { validator } from 'hono/validator'; | ||
if (hook) { | ||
const hookResult = hook(result, c); | ||
const hookResult = hook({ data: value, ...result }, c); | ||
if (hookResult instanceof Response || hookResult instanceof Promise) { | ||
@@ -8,0 +8,0 @@ return hookResult; |
{ | ||
"name": "@hono/zod-validator", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Validator middleware using Zod", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
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
3684
52