is-my-json-valid
A fast JSON Schema validator for JavaScript that compiles a schema into generated validation code instead of interpreting it at runtime.
is-my-json-valid compiles a JSON Schema into a validation function through code generation, aiming to make validating documents against a schema fast. It passes the full JSON Schema version 4 test suite apart from remote references and length checks on unicode surrogate pairs.
Beyond the standard JSON Schema formats, it accepts custom formats supplied as an option, external schemas that a main schema can reference by name, and a verbose mode that adds the offending value and the path within the schema to each reported error. A separate filter function strips properties from a document that are not declared in its schema.
It is distributed as an npm package and released under the MIT license.