import { v } from 'https://deno.land/x/typemap@v0.2.0/mod.ts'
import type { Static, Schema } from 'https://deno.land/x/typemap@v0.2.0/mod.ts'
const schema = v.object({
key: v.literal('value')
})
const valid = {
key: 'value'
}
const invalid = {
key: 'key'
}
console.log(v(schema, valid)) // true
console.log(v(schema, invalid)) // false
This repository has been archived by the owner on Oct 29, 2023. It is now read-only.
A lightweight wrapper around TypeBox.
License
boywithkeyboard/typemap
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A lightweight wrapper around TypeBox.