Package Exports
- indicative-compiler
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (indicative-compiler) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme

Indicative Compiler
Indicative compiler to compile validations schema into a highly optimized executable function.
Indicative is a highly performant validation library for Node.js. It achieves this by compiling the schema into a tree and then an a top level executable function.
Table of contents
Usage
Install the package from npm registry as follows:
You must use indicative directly. This is a low level module meant to be used by indicative itself.
npm i indicative-compiler
# yarn
yarn add indicative-compiler
and then use it as follows:
import { ValidatorCompiler, ValidatorExecutor } from 'indicative-compiler'
import { VanillaFormatter } from 'indicative-formatters'
import * as validations from 'indicative-rules'
const schema = {
username: 'required',
email: 'required|email'
}
const messages = {}
// Do it once for each schema
const compiledFunctions = new ValidatorCompiler(schema, messages).compile()
await new ValidatorExecutor(compiledFunctions).exec(data, VanillaFormatter, {}, false, false)
The ValidatorExecutor.exec
function takes 5 parameters.
data
: The runtime data to validate against the compiled schema.formatter
: Formatter constructor to collect and format error messages.config
: The config to be passed to all the validation functions.bail
: Whentrue
, it will stop after first error.removeAdditional
: Whentrue
, theexec
will return only validated properties.
API Docs
Following are the autogenerated files via Typedoc