From 4e87195739f2a5d9a05451b48773c8afdc680765 Mon Sep 17 00:00:00 2001
From: akiyamn
Date: Sun, 24 Sep 2023 23:22:21 +1000
Subject: Initial commit (by create-cloudflare CLI)
---
node_modules/zod/README.md | 2847 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 2847 insertions(+)
create mode 100644 node_modules/zod/README.md
(limited to 'node_modules/zod/README.md')
diff --git a/node_modules/zod/README.md b/node_modules/zod/README.md
new file mode 100644
index 0000000..5649249
--- /dev/null
+++ b/node_modules/zod/README.md
@@ -0,0 +1,2847 @@
+
+
+
Zod
+
+ ✨ https://zod.dev ✨
+
+ TypeScript-first schema validation with static type inference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+> These docs have been translated into [Chinese](./README_ZH.md).
+
+## Table of contents
+
+
+
+- [Table of contents](#table-of-contents)
+- [Introduction](#introduction)
+ - [Sponsors](#sponsors)
+ - [Gold](#gold)
+ - [Silver](#silver)
+ - [Bronze](#bronze)
+ - [Ecosystem](#ecosystem)
+ - [Resources](#resources)
+ - [API libraries](#api-libraries)
+ - [Form integrations](#form-integrations)
+ - [Zod to X](#zod-to-x)
+ - [X to Zod](#x-to-zod)
+ - [Mocking](#mocking)
+ - [Powered by Zod](#powered-by-zod)
+ - [Utilities for Zod](#utilities-for-zod)
+- [Installation](#installation)
+ - [Requirements](#requirements)
+ - [From `npm` (Node/Bun)](#from-npm-nodebun)
+ - [From `deno.land/x` (Deno)](#from-denolandx-deno)
+- [Basic usage](#basic-usage)
+- [Primitives](#primitives)
+- [Coercion for primitives](#coercion-for-primitives)
+- [Literals](#literals)
+- [Strings](#strings)
+ - [ISO datetimes](#iso-datetimes)
+ - [IP addresses](#ip-addresses)
+- [Numbers](#numbers)
+- [BigInts](#bigints)
+- [NaNs](#nans)
+- [Booleans](#booleans)
+- [Dates](#dates)
+- [Zod enums](#zod-enums)
+- [Native enums](#native-enums)
+- [Optionals](#optionals)
+- [Nullables](#nullables)
+- [Objects](#objects)
+ - [`.shape`](#shape)
+ - [`.keyof`](#keyof)
+ - [`.extend`](#extend)
+ - [`.merge`](#merge)
+ - [`.pick/.omit`](#pickomit)
+ - [`.partial`](#partial)
+ - [`.deepPartial`](#deeppartial)
+ - [`.required`](#required)
+ - [`.passthrough`](#passthrough)
+ - [`.strict`](#strict)
+ - [`.strip`](#strip)
+ - [`.catchall`](#catchall)
+- [Arrays](#arrays)
+ - [`.element`](#element)
+ - [`.nonempty`](#nonempty)
+ - [`.min/.max/.length`](#minmaxlength)
+- [Tuples](#tuples)
+- [Unions](#unions)
+- [Discriminated unions](#discriminated-unions)
+- [Records](#records)
+ - [Record key type](#record-key-type)
+- [Maps](#maps)
+- [Sets](#sets)
+- [Intersections](#intersections)
+- [Recursive types](#recursive-types)
+ - [ZodType with ZodEffects](#zodtype-with-zodeffects)
+ - [JSON type](#json-type)
+ - [Cyclical objects](#cyclical-objects)
+- [Promises](#promises)
+- [Instanceof](#instanceof)
+- [Functions](#functions)
+- [Preprocess](#preprocess)
+- [Custom schemas](#custom-schemas)
+- [Schema methods](#schema-methods)
+ - [`.parse`](#parse)
+ - [`.parseAsync`](#parseasync)
+ - [`.safeParse`](#safeparse)
+ - [`.safeParseAsync`](#safeparseasync)
+ - [`.refine`](#refine)
+ - [Arguments](#arguments)
+ - [Customize error path](#customize-error-path)
+ - [Asynchronous refinements](#asynchronous-refinements)
+ - [Relationship to transforms](#relationship-to-transforms)
+ - [`.superRefine`](#superrefine)
+ - [Abort early](#abort-early)
+ - [Type refinements](#type-refinements)
+ - [`.transform`](#transform)
+ - [Chaining order](#chaining-order)
+ - [Validating during transform](#validating-during-transform)
+ - [Relationship to refinements](#relationship-to-refinements)
+ - [Async transforms](#async-transforms)
+ - [`.default`](#default)
+ - [`.describe`](#describe)
+ - [`.catch`](#catch)
+ - [`.optional`](#optional)
+ - [`.nullable`](#nullable)
+ - [`.nullish`](#nullish)
+ - [`.array`](#array)
+ - [`.promise`](#promise)
+ - [`.or`](#or)
+ - [`.and`](#and)
+ - [`.brand`](#brand)
+ - [`.readonly`](#readonly)
+ - [`.pipe`](#pipe)
+ - [You can use `.pipe()` to fix common issues with `z.coerce`.](#you-can-use-pipe-to-fix-common-issues-with-zcoerce)
+- [Guides and concepts](#guides-and-concepts)
+ - [Type inference](#type-inference)
+ - [Writing generic functions](#writing-generic-functions)
+ - [Constraining allowable inputs](#constraining-allowable-inputs)
+ - [Error handling](#error-handling)
+ - [Error formatting](#error-formatting)
+- [Comparison](#comparison)
+ - [Joi](#joi)
+ - [Yup](#yup)
+ - [io-ts](#io-ts)
+ - [Runtypes](#runtypes)
+ - [Ow](#ow)
+- [Changelog](#changelog)
+
+## Introduction
+
+Zod is a TypeScript-first schema declaration and validation library. I'm using the term "schema" to broadly refer to any data type, from a simple `string` to a complex nested object.
+
+Zod is designed to be as developer-friendly as possible. The goal is to eliminate duplicative type declarations. With Zod, you declare a validator _once_ and Zod will automatically infer the static TypeScript type. It's easy to compose simpler types into complex data structures.
+
+Some other great aspects:
+
+- Zero dependencies
+- Works in Node.js and all modern browsers
+- Tiny: 8kb minified + zipped
+- Immutable: methods (e.g. `.optional()`) return a new instance
+- Concise, chainable interface
+- Functional approach: [parse, don't validate](https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/)
+- Works with plain JavaScript too! You don't need to use TypeScript.
+
+### Sponsors
+
+Sponsorship at any level is appreciated and encouraged. For individual developers, consider the [Cup of Coffee tier](https://github.com/sponsors/colinhacks). If you built a paid product using Zod, consider one of the [podium tiers](https://github.com/sponsors/colinhacks).
+
+#### Gold
+
+
+
+
+
+
+
+
+ Astro
+
+ astro.build
+
+
+ Astro is a new kind of static
+ site builder for the modern web.
+ Powerful developer experience meets
+ lightweight output.
+ |
+
+
+
+
+
+ Glow Wallet
+
+ glow.app
+
+ Your new favorite
+
+ Solana wallet.
+ |
+
+
+
+
+
+
+
+ Deletype
+
+ deletype.com
+ |
+
+
+
+
+
+ Proxy
+
+ proxy.com
+ |
+
+
+
+
+
+
+
+ Trigger.dev
+
+ trigger.dev
+
+ Effortless automation for developers.
+ |
+
+
+
+
+
+ Transloadit
+
+ transloadit.com
+
+ Simple file processing for developers.
+ |
+
+
+
+
+
+
+
+ Infisical
+
+ infisical.com
+
+ Open-source platform for secret management: sync secrets across your team/infrastructure and prevent secret leaks.
+ |
+
+
+
+#### Silver
+
+
+
+#### Bronze
+
+
+
+### Ecosystem
+
+There are a growing number of tools that are built atop or support Zod natively! If you've built a tool or library on top of Zod, tell me about it [on Twitter](https://twitter.com/colinhacks) or [start a Discussion](https://github.com/colinhacks/zod/discussions). I'll add it below and tweet it out.
+
+#### Resources
+
+- [Total TypeScript Zod Tutorial](https://www.totaltypescript.com/tutorials/zod) by [@mattpocockuk](https://twitter.com/mattpocockuk)
+- [Fixing TypeScript's Blindspot: Runtime Typechecking](https://www.youtube.com/watch?v=rY_XqfSHock) by [@jherr](https://twitter.com/jherr)
+
+#### API libraries
+
+- [`tRPC`](https://github.com/trpc/trpc): Build end-to-end typesafe APIs without GraphQL.
+- [`@anatine/zod-nestjs`](https://github.com/anatine/zod-plugins/tree/main/packages/zod-nestjs): Helper methods for using Zod in a NestJS project.
+- [`zod-endpoints`](https://github.com/flock-community/zod-endpoints): Contract-first strictly typed endpoints with Zod. OpenAPI compatible.
+- [`domain-functions`](https://github.com/SeasonedSoftware/domain-functions/): Decouple your business logic from your framework using composable functions. With first-class type inference from end to end powered by Zod schemas.
+- [`@zodios/core`](https://github.com/ecyrbe/zodios): A typescript API client with runtime and compile time validation backed by axios and zod.
+- [`express-zod-api`](https://github.com/RobinTail/express-zod-api): Build Express-based APIs with I/O schema validation and custom middlewares.
+- [`tapiduck`](https://github.com/sumukhbarve/monoduck/blob/main/src/tapiduck/README.md): End-to-end typesafe JSON APIs with Zod and Express; a bit like tRPC, but simpler.
+- [`koa-zod-router`](https://github.com/JakeFenley/koa-zod-router): Create typesafe routes in Koa with I/O validation using Zod.
+
+#### Form integrations
+
+- [`conform`](https://conform.guide/api/zod): A progressive enhancement first form validation library for Remix and React Router
+- [`react-hook-form`](https://github.com/react-hook-form/resolvers#zod): A first-party Zod resolver for React Hook Form.
+- [`zod-validation-error`](https://github.com/causaly/zod-validation-error): Generate user-friendly error messages from `ZodError`s.
+- [`zod-formik-adapter`](https://github.com/robertLichtnow/zod-formik-adapter): A community-maintained Formik adapter for Zod.
+- [`react-zorm`](https://github.com/esamattis/react-zorm): Standalone `