mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 23:14:53 +09:00
Update non-web related dependencies to their latest version were possible. It appears yargs has changed its parsing of command line options to no longer remove a layer of quotes.
22 lines
439 B
JavaScript
22 lines
439 B
JavaScript
/**
|
|
* JSON schemas used for validating link messages
|
|
* @module lib/schema
|
|
*/
|
|
"use strict";
|
|
const Ajv = require("ajv");
|
|
const ajv = new Ajv({
|
|
allowUnionTypes: true,
|
|
strict: "log",
|
|
verbose: true,
|
|
});
|
|
|
|
module.exports = {
|
|
/**
|
|
* Compile JSON schema into validator
|
|
* @function
|
|
* @param {Object} schema - JSON schema to create validator for.
|
|
* @returns {Function} Validator for the schema.
|
|
*/
|
|
compile: ajv.compile.bind(ajv),
|
|
};
|