npm.io
1.0.0-alpha.33 • Published 2 weeks ago

@shexjs/eval-simple-1err

Licence
MIT
Version
1.0.0-alpha.33
Deps
4
Size
119 kB
Vulns
0
Weekly
0
Stars
62

@shexjs/eval-simple-1err

npm version CI

The fast matching engine for @shexjs/validator: an implementation of @shexjs/eval-validator-api which stops at the first error.

A shape's triple expression is essentially a regular expression over the node's arcs. Where the default engine (@shexjs/eval-threaded-nerr) enumerates every way a match could fail, this one reports the first miss and moves on — the right trade when conformance is the question and diagnosis isn't:

const {ShExValidator} = require("@shexjs/validator");
new ShExValidator(schema, db, {
  regexModule: require("@shexjs/eval-simple-1err").RegexpModule
});

From @shexjs/cli, the same choice is --regex-module @shexjs/eval-simple-1err.

Install

npm install @shexjs/eval-simple-1err

@shexjs/eval-simple-1err is one of the shex.js packages; installing shex pulls in the whole suite, and its README maps them.

Keywords