Getting Started
#
Forward@zuze/schema was created out of love and admiration for projects like joi, yup, and ajv which are all schema validators. Each package brings it's own strengths. The strength (I hope) that @zuze/schema
brings is that it's fun to use, whether you're somebody who likes to write functional code or somebody who likes to write highly reusable configuration (who doesn't love a some good YAML....but we use JSON.)
@zuze/schema is one package that comes in two flavors - functional or ast.
Throughout these docs code examples will be presented in tabs in functional and AST form (where applicable). Pick the one that's right for you and your project!
More on that after the set up:
#
InstallationInstall @zuze/schema using yarn or npm
- npm
- yarn
#
Creating a SchemaLet's start by creating some very simple schemas:
- ast
- functional