Spaces:
Sleeping
Sleeping
Download gui/frontend/node_modules/eslint/lib/shared/ajv.js from BrianLov/guiBackend: direct link, hf CLI and curl.
- Browser
- Download file 931 Bytes
-
https://huggingface.co/spaces/BrianLov/guiBackend/resolve/main/gui/frontend/node_modules/eslint/lib/shared/ajv.js
- Command line
-
hf download hf://spaces/BrianLov/guiBackend/gui/frontend/node_modules/eslint/lib/shared/ajv.js
-
curl -L -o ajv.js https://huggingface.co/spaces/BrianLov/guiBackend/resolve/main/gui/frontend/node_modules/eslint/lib/shared/ajv.js
931 Bytes
| /** | |
| * @fileoverview The instance of Ajv validator. | |
| * @author Evgeny Poberezkin | |
| */ | |
| ; | |
| //------------------------------------------------------------------------------ | |
| // Requirements | |
| //------------------------------------------------------------------------------ | |
| const Ajv = require("ajv"), | |
| metaSchema = require("ajv/lib/refs/json-schema-draft-04.json"); | |
| //------------------------------------------------------------------------------ | |
| // Public Interface | |
| //------------------------------------------------------------------------------ | |
| module.exports = (additionalOptions = {}) => { | |
| const ajv = new Ajv({ | |
| meta: false, | |
| useDefaults: true, | |
| validateSchema: false, | |
| missingRefs: "ignore", | |
| verbose: true, | |
| schemaId: "auto", | |
| ...additionalOptions, | |
| }); | |
| ajv.addMetaSchema(metaSchema); | |
| // eslint-disable-next-line no-underscore-dangle -- Ajv's API | |
| ajv._opts.defaultMeta = metaSchema.id; | |
| return ajv; | |
| }; | |