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

myzod

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

myzod - npm Package Compare versions

Comparing version 0.0.33 to 0.0.34

6

libs/types.d.ts

@@ -5,5 +5,5 @@ export declare abstract class Type<T> {

abstract and<K extends AnyType>(schema: K): any;
or<K extends AnyType>(schema: K): UnionType<[Type<T>, K]>;
optional(): OptionalType<Type<T>>;
nullable(): NullableType<Type<T>>;
or<K extends AnyType>(schema: K): UnionType<[this, K]>;
optional(): OptionalType<this>;
nullable(): NullableType<this>;
}

@@ -10,0 +10,0 @@ export declare class ValidationError extends Error {

@@ -303,2 +303,23 @@ "use strict";

}
if (keys.length === 0 && keySig) {
const convVal = this[coercionTypeSybol] ? {} : undefined;
for (const key in value) {
try {
if (convVal) {
convVal[key] = keySig.parse(value[key], { suppressPathErrMsg: true });
}
else {
keySig.parse(value[key], { suppressPathErrMsg: true });
}
}
catch (err) {
const path = err.path ? [key, ...err.path] : [key];
const msg = parseOpts.suppressPathErrMsg
? err.message
: `error parsing object at path: "${prettyPrintPath(path)}" - ${err.message}`;
throw new ValidationError(msg, path);
}
}
return convVal || value;
}
if (keySig) {

@@ -305,0 +326,0 @@ const convVal = this[coercionTypeSybol] ? {} : undefined;

{
"name": "myzod",
"version": "0.0.33",
"version": "0.0.34",
"description": "",

@@ -5,0 +5,0 @@ "main": "./libs/index.js",

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