@zhead/zod
The `@zhead/schema` transformed to [Zod](https://github.com/colinhacks/zod].
Last updated 4 years ago by harlan_zw .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @zhead/zod 
SYNC missed versions from official npm registry.

@zhead/zod

The @zhead/schema transformed to [Zod](https://github.com/colinhacks/zod].

Provides safe parsing and validation of head schema.

Installation

npm install --save-dev @zhead/zod

# Using yarn
yarn add --dev @zhead/zod

API

All exports are Zod based schemas and can be individually used to validate any part of the head schema.

Example

If you'd like to parse or validate the full head schema you can do the following

import { headSchema } from "@zhead/zod"

headSchema.safeParse({
  title: 'Test title',
  meta: [
    { description: 'My Description' }
  ]
})

// {
//   "error": [ZodError: [
//     {
//       "code": "custom",
//       "message": "The attribute `content` must be included.",
//       "path": [
//         "meta",
//         0
//       ]
//     }
//   ]],
//   "success": false,
// }

Current Tags

  • 0.9.5                                ...           latest (3 years ago)

33 Versions

  • 0.9.5                                ...           3 years ago
  • 0.9.4                                ...           3 years ago
  • 0.9.3                                ...           3 years ago
  • 0.9.2                                ...           3 years ago
  • 0.9.0                                ...           3 years ago
  • 0.9.1                                ...           3 years ago
  • 0.8.5                                ...           4 years ago
  • 0.8.4                                ...           4 years ago
  • 0.8.3                                ...           4 years ago
  • 0.8.2                                ...           4 years ago
  • 0.8.1                                ...           4 years ago
  • 0.8.0                                ...           4 years ago
  • 0.7.4                                ...           4 years ago
  • 0.7.3                                ...           4 years ago
  • 0.7.2                                ...           4 years ago
  • 0.7.1                                ...           4 years ago
  • 0.7.0                                ...           4 years ago
  • 0.6.2                                ...           4 years ago
  • 0.6.1                                ...           4 years ago
  • 0.6.0                                ...           4 years ago
  • 0.5.3                                ...           4 years ago
  • 0.5.2                                ...           4 years ago
  • 0.5.1                                ...           4 years ago
  • 0.5.0                                ...           4 years ago
  • 0.4.1                                ...           4 years ago
  • 0.4.0                                ...           4 years ago
  • 0.3.2                                ...           4 years ago
  • 0.3.1                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.4                                ...           4 years ago
  • 0.2.3                                ...           4 years ago
  • 0.2.2                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 9
This Month 9
Last Day 0
Last Week 1
Last Month 1
Dependencies (1)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |