Socket
Socket
Sign inDemoInstall

zod

Package Overview
Dependencies
Maintainers
1
Versions
361
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zod - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

playground.ts

7

package.json
{
"name": "zod",
"version": "1.0.4",
"version": "1.0.5",
"description": "Typescript-first schema declaration and validation library with static type inference",

@@ -31,3 +31,6 @@ "main": "index.ts",

"inference"
]
],
"scripts": {
"play": "nodemon -e ts -w . -x ts-node playground.ts"
}
}

@@ -113,6 +113,3 @@ ### Table of contents

dogSchema.parse([
{ name: 'Cujo', neutered: null },
{ name: 'Fido', age: 4, neutered: true },
]); // passes
dogsList.parse([{ name: 'Fido', age: 4, neutered: true }]); // passes

@@ -119,0 +116,0 @@ dogsList.parse([]); // passes

@@ -45,2 +45,10 @@ import { ZodTuple } from './tuple';

parse: (x: unknown) => Type;
is(u: unknown): u is Type {
try {
this.parse(u);
return true;
} catch (err) {
return false;
}
}

@@ -47,0 +55,0 @@ constructor(def: Def) {

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