1.2.0 • Published 8 months ago

@comapeo/schema v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@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

1.2.0

8 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.0

9 months ago