Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@iyio/common

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iyio/common - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

2

esm/src/lib/zod-helpers.d.ts

@@ -21,2 +21,2 @@ import { ZodEnum, ZodError, ZodSchema, ZodTypeAny } from "zod";

} | undefined;
export declare const zodTypeToJsonScheme: (scheme: ZodTypeAny, maxDepth?: number) => JsonScheme | undefined;
export declare const zodTypeToJsonScheme: (scheme: ZodTypeAny, maxDepth?: number, cache?: boolean) => JsonScheme | undefined;

@@ -145,5 +145,14 @@ import { ZodArray, ZodBoolean, ZodEnum, ZodLazy, ZodLiteral, ZodNull, ZodNumber, ZodObject, ZodOptional, ZodString, ZodUndefined, ZodUnion } from "zod";

};
export const zodTypeToJsonScheme = (scheme, maxDepth = 10) => {
const cacheKey = Symbol('zodHelperCacheKey');
export const zodTypeToJsonScheme = (scheme, maxDepth = 10, cache = true) => {
var _a;
return (_a = _zodTypeToJsonScheme(scheme, maxDepth)) === null || _a === void 0 ? void 0 : _a.jsonType;
const cached = cache ? scheme[cacheKey] : undefined;
if (cached) {
return cached;
}
const v = (_a = _zodTypeToJsonScheme(scheme, maxDepth)) === null || _a === void 0 ? void 0 : _a.jsonType;
if (cache) {
scheme[cacheKey] = v;
}
return v;
};

@@ -150,0 +159,0 @@ const _zodTypeToJsonScheme = (type, depth) => {

{
"name": "@iyio/common",
"version": "0.5.2",
"version": "0.5.3",
"sideEffects": false,

@@ -5,0 +5,0 @@ "dependencies": {

@@ -21,2 +21,2 @@ import { ZodEnum, ZodError, ZodSchema, ZodTypeAny } from "zod";

} | undefined;
export declare const zodTypeToJsonScheme: (scheme: ZodTypeAny, maxDepth?: number) => JsonScheme | undefined;
export declare const zodTypeToJsonScheme: (scheme: ZodTypeAny, maxDepth?: number, cache?: boolean) => JsonScheme | undefined;

@@ -153,5 +153,14 @@ "use strict";

exports.zodCoerceNullDbValuesInObject = zodCoerceNullDbValuesInObject;
const zodTypeToJsonScheme = (scheme, maxDepth = 10) => {
const cacheKey = Symbol('zodHelperCacheKey');
const zodTypeToJsonScheme = (scheme, maxDepth = 10, cache = true) => {
var _a;
return (_a = _zodTypeToJsonScheme(scheme, maxDepth)) === null || _a === void 0 ? void 0 : _a.jsonType;
const cached = cache ? scheme[cacheKey] : undefined;
if (cached) {
return cached;
}
const v = (_a = _zodTypeToJsonScheme(scheme, maxDepth)) === null || _a === void 0 ? void 0 : _a.jsonType;
if (cache) {
scheme[cacheKey] = v;
}
return v;
};

@@ -158,0 +167,0 @@ exports.zodTypeToJsonScheme = zodTypeToJsonScheme;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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