Skip to content

The Zod helper library, because sometimes you need a little help from a Kryptonian

License

Notifications You must be signed in to change notification settings

flarebyte/faora-kai

Repository files navigation

faora-kai

npm Build status npm bundle size

npm type definitions node-current NPM

Experimental

The Zod helper library, because sometimes you need a little help from a Kryptonian

Helper functions for zod, the typeScript-first schema validation with static type inference

Hero image for faora-kai

Highlights:

  • Simplify error handling with zod by using a custom formatter
  • Protect sensitive data from leaking in error messages by using a privacy-aware formatter
  • Create a dictionary of string constraints based on the Fibonacci sequence

A few examples of commands:

Parse an object using Zod validation:

const result = safeParse<TestSchema>(content, {schema, formatting:
'human-friendly'});

Declare a string field from 1 to 10 characters:

stringFields.string1To10

Documentation and links

Related

Installation

This package is ESM only.

yarn add faora-kai

About

The Zod helper library, because sometimes you need a little help from a Kryptonian

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published