1.2.0 • Published 8 months ago
@comapeo/schema v1.2.0
@comapeo/schema
JSON Schema and TypeScript types for CoMapeo.
Original draft: https://hackmd.io/wlMcMM65TmuPXGYOEbOR2g#
Table of Contents
Install
npm install --save @comapeo/schema
Usage
JS validation functions
import { validate } from '@comapeo/schema'
const testObservation = {
/* ... */
}
const isValid = validate('observation', testObservation)
// returns true if validates against schema, false otherwise.
TypeScript types
import type { Observation } from '@comapeo/schema'
const myObs: Observation = {
/* ... */
}
API
Maintainers
License
MIT © 2024 Awana Digital