Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 804 Bytes

README.md

File metadata and controls

54 lines (35 loc) · 804 Bytes

@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

@digidem

License

MIT © 2024 Awana Digital