2.0.0 • Published 3 years ago

jsvrx-djv v2.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

jsvrx-djv

RxJS operators to validate/discriminate data objects using JSON Schema(s) and Dynamic JSON Schema Validator.

npm djv npm bundle size Top Language MIT License

Install

npm i jsvrx-djv

Usage

DjvDataValidtor is DataValidator interface implementation using Djv.

For more information about DataValidation interface and usage examples see jsvrx.

Create a new DjvDataValidator instance by passing a djv instance as the constructor's parameter.

import djv from 'djv';
import { DjvDataValidator } from { jsvrx-djv }
const djvVD = new djv();
djvVD.useVersion('draft-06');
const dv = new DjvDataValidator(djvVD);

DjvDataValidator.discriminate(ids: JSONSchemaID[], inv?: JSONSchemaID) implementation doesn't provide optimized validation for multiple JSON Schemas. It executes single JSON Schema validation attempts in ids array order. Fill the ids array accordingly.