@shexjs/eval-simple-1err
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.