@fasciajs/core
v0.3.0
Published
The waist. What a schema is once read, and the term between the two trees.
Maintainers
Readme
@fasciajs/core
The term a schema is described as, and the departures a target reports about it.
Part of fascia. A schema is described once and written as anything: four validators and five targets, and neither side knows the other exists.
npm install @fasciajs/coreNothing here names a validator or a target. A frontend reads a schema into a Node, describe
folds that into a Described, and a target writes the Described down.
import { describe, isError, refusing } from '@fasciajs/core'
import { zodSource } from '@fasciajs/zod'
const described = describe(schema, zodSource, 'input')
if (isError(described)) throw new Error(described.message)
described.term // what is true of the value
described.definitions // what it referred to by nameSee the root README for the whole shape, what it refuses, and the numbers.
MIT.
