Comparing version 1.0.4 to 1.0.5
{ | ||
"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) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
44553
1004
0
431