This package has been deprecated

Author message:

This library is no longer used/required by the jsonotron system.

jsonotron-fields

0.1.0 • Public • Published

A library of field type definitions included with the Jsonotron engine

npm JavaScript Style Guide

A library of field type definitions. This is in a separate library so that it can be included in the Jsonotron engine but also incorporated into documentation pipelines.

This package is part of the Jsonotron system.

Jsonotron is...

  • a small set of components for building a NodeJS microservice
  • for storing, patching and querying JSON documents
  • stored in a schemaless/NoSQL database
  • that have known, enforceable, and evolving schemas.

Visit https://karlhulme.github.io/jsonotron/ for details on how to get started.

Installation

npm install jsonotron-fields --save

Usage

const { builtinFieldTypes, combineCustomAndBuiltinFieldTypes, createAjvForFieldTypes, ensureFieldTypesAreValid } = require('jsonotron-fields')

const customFieldTypes = [] // add custom field types here
const combinedFieldTypes = combineCustomAndBuiltinFieldTypes(customFieldTypes, builtinFieldTypes)
const ajv = createAjvForFieldTypes(combinedFieldTypes)
ensureFieldTypesAreValid(ajv, combinedFieldTypes)

Development

Code base adheres to the rules chosen by https://standardjs.com/. Code is formatted with 2 spaces.

Tests are written using Jest with 100% coverage.

npm test

Continuous Deployment

Any commits to master will cause the library to be re-published.

Readme

Keywords

none

Package Sidebar

Install

npm i jsonotron-fields

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

114 kB

Total Files

68

Last publish

Collaborators

  • karlhulme