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.5 to 1.0.6

lib/index.d.ts

31

package.json
{
"name": "zod",
"version": "1.0.5",
"version": "1.0.6",
"description": "Typescript-first schema declaration and validation library with static type inference",
"main": "index.ts",
"main": "./lib/main.js",
"types": "./lib/main.d.ts",
"files": [
"lib"
],
"repository": {

@@ -32,5 +36,28 @@ "type": "git",

],
"include": [
"src"
],
"exclude": [
"node_modules",
"**/__tests__/*"
],
"scripts": {
"clean": "rm -rf lib/*",
"build": "yarn run clean && tsc",
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
"lint": "tslint -p tsconfig.json",
"test": "jest --config jestconfig.json",
"prepare": "npm run build",
"play": "nodemon -e ts -w . -x ts-node playground.ts"
},
"devDependencies": {
"@types/jest": "^25.1.4",
"jest": "^25.1.0",
"nodemon": "^2.0.2",
"prettier": "^1.19.1",
"ts-jest": "^25.2.1",
"tslint": "^6.1.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.8.3"
}
}

18

README.md

@@ -180,3 +180,3 @@ ### Table of contents

F.parse(undefined); // => undefined
F.parse(null); // => 42
F.parse(null); // => null
F.parse({}); // => throws Error!

@@ -266,8 +266,8 @@

const Category: z.ZodType<Category> = z.lazy(() => {
return z.object({
const Category: z.ZodType<Category> = z.lazy(() =>
z.object({
name: z.string(),
subcategories: z.array(Category),
});
});
})
);

@@ -296,4 +296,4 @@ Category.parse({

const args = z.tuple([
z.object({ nameStartsWith: z.string() }),
z.object({ skip: z.number(), limit: z.number() }),
z.object({ nameStartsWith: z.string() }), // filters
z.object({ skip: z.number(), limit: z.number() }), // pagination
]);

@@ -340,3 +340,5 @@

}
); // => returns { id: string; name: string; }[]
);
// `typeof users` => { id: string; name: string; }[]
```

@@ -343,0 +345,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