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

@shexjs/eval-threaded-nerr

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

@shexjs/eval-threaded-nerr

npm version CI

The thorough matching engine for @shexjs/validator: an implementation of @shexjs/eval-validator-api which exhaustively enumerates the combinations of ways a node's triples can (fail to) satisfy a shape's triple expression.

A shape's triple expression is essentially a regular expression over the node's arcs. This engine follows every thread of that match, so a failure reports each way the data missed — the error lists the WebApp and @shexjs/util's errsToSimple render. It is @shexjs/validator's default; you only name it to be explicit:

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

From @shexjs/cli, the same choice is --regex-module @shexjs/eval-threaded-nerr. When you want speed over diagnosis — the first error is enough — use @shexjs/eval-simple-1err instead.

Install

npm install @shexjs/eval-threaded-nerr

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

Keywords