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 1.9.2 to 1.10.0

5

libs/types.d.ts

@@ -367,3 +367,3 @@ import { keySignature } from './index';

};
export declare class EnumType<T> extends Type<ValueOf<T>> implements Defaultable<ValueOf<T>> {
export declare class EnumType<T> extends Type<ValueOf<T>> implements Defaultable<ValueOf<T>>, WithPredicate<ValueOf<T>> {
private readonly enumeration;

@@ -373,2 +373,3 @@ private values;

private readonly coerceOpt?;
private readonly predicates;
constructor(enumeration: T, opts?: EnumOptions<T>);

@@ -380,2 +381,4 @@ parse(value?: unknown): ValueOf<T>;

coerce(opt: EnumCoerceOptions): EnumType<T>;
enum(): T;
withPredicate(fn: (value: ValueOf<T>) => boolean, errMsg?: ErrMsg<ValueOf<T>> | undefined): this;
}

@@ -382,0 +385,0 @@ type DeepPartial<T> = {

@@ -1207,2 +1207,3 @@ "use strict";

this.values = Object.values(enumeration);
this.predicates = null;
this.coerceOpt = opts.coerce;

@@ -1225,2 +1226,5 @@ this.defaultValue = opts.defaultValue;

}
if (this.predicates) {
applyPredicates(this.predicates, coercedValue);
}
return coercedValue;

@@ -1240,2 +1244,8 @@ }

}
enum() {
return this.enumeration;
}
withPredicate(fn, errMsg) {
return withPredicate(this, { func: fn, errMsg });
}
}

@@ -1242,0 +1252,0 @@ exports.EnumType = EnumType;

2

package.json
{
"name": "myzod",
"version": "1.9.2",
"version": "1.10.0",
"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