New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hono/zod-validator

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hono/zod-validator - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

7

dist/cjs/index.js

@@ -10,5 +10,5 @@ "use strict";

if (hook) {
const hookResult = hook({ data: value, ...result }, c);
const hookResult = await hook({ data: value, ...result }, c);
if (hookResult) {
if (hookResult instanceof Response || hookResult instanceof Promise) {
if (hookResult instanceof Response) {
return hookResult;

@@ -24,5 +24,4 @@ }

}
const data = result.data;
return data;
return result.data;
});
exports.zValidator = zValidator;

@@ -10,3 +10,3 @@ import type { Context, MiddlewareHandler, Env, ValidationTargets, TypedResponse, Input } from 'hono';

data: T;
}, c: Context<E, P>) => Response | Promise<Response> | void | Promise<Response | void> | TypedResponse<O>;
}, c: Context<E, P>) => Response | void | TypedResponse<O> | Promise<Response | void | TypedResponse<O>>;
type HasUndefined<T> = undefined extends T ? true : false;

@@ -13,0 +13,0 @@ export declare const zValidator: <T extends z.ZodType<any, z.ZodTypeDef, any>, Target extends keyof ValidationTargets, E extends Env, P extends string, In = z.input<T>, Out = z.output<T>, I extends Input = {

@@ -7,5 +7,5 @@ import { validator } from 'hono/validator';

if (hook) {
const hookResult = hook({ data: value, ...result }, c);
const hookResult = await hook({ data: value, ...result }, c);
if (hookResult) {
if (hookResult instanceof Response || hookResult instanceof Promise) {
if (hookResult instanceof Response) {
return hookResult;

@@ -21,4 +21,3 @@ }

}
const data = result.data;
return data;
return result.data;
});
{
"name": "@hono/zod-validator",
"version": "0.2.1",
"version": "0.2.2",
"description": "Validator middleware using Zod",

@@ -5,0 +5,0 @@ "type": "module",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc