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.37 to 0.0.38

2

libs/index.d.ts

@@ -32,3 +32,3 @@ import { ValidationError, Type, StringType, NumberType, LiteralType, ObjectType, ArrayType, UnionType, PartialType, TupleType, DateType, LazyType, UndefinedType, NullType, EnumType, BooleanType, UnknownType, Literal, ObjectShape, ObjectOptions, AnyType, UnionOptions, PartialOpts, IntersectionResult, DeepPartialShape, PartialShape, Eval, ToUnion, keySignature, StringTypes, OptionalType } from './types';

};
export declare const literalUnion: <T extends Literal[]>(...args: T) => UnionType<ToLiteralUnion<T>>;
export declare const literals: <T extends Literal[]>(...args: T) => UnionType<ToLiteralUnion<T>>;
export declare const record: <T extends AnyType>(schema: T) => ObjectType<{

@@ -35,0 +35,0 @@ [keySignature]: T;

@@ -17,3 +17,3 @@ "use strict";

exports.intersection = (l, r) => l.and(r);
exports.literalUnion = (...args) => new types_1.UnionType(args.map(exports.literal));
exports.literals = (...args) => new types_1.UnionType(args.map(exports.literal));
exports.record = (schema) => new types_1.ObjectType({ [types_1.keySignature]: schema });

@@ -20,0 +20,0 @@ exports.dictionary = (schema) => {

{
"name": "myzod",
"version": "0.0.37",
"version": "0.0.38",
"description": "",

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

@@ -237,4 +237,6 @@ # myzod

##### Literals
```typescript
const schema = myzod.literalUnion('red', 'green', 'blue');
const schema = myzod.literals('red', 'green', 'blue');
type Schema = myzod.Infer<typeof schema>; // => 'red' | 'green' | 'blue'

@@ -241,0 +243,0 @@

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