source: trip-planner-front/node_modules/ajv/dist/vocabularies/jtd/elements.js@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 914 bytes
Line 
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const util_1 = require("../../compile/util");
4const code_1 = require("../code");
5const codegen_1 = require("../../compile/codegen");
6const metadata_1 = require("./metadata");
7const nullable_1 = require("./nullable");
8const error_1 = require("./error");
9const def = {
10 keyword: "elements",
11 schemaType: "object",
12 error: error_1.typeError("array"),
13 code(cxt) {
14 metadata_1.checkMetadata(cxt);
15 const { gen, data, schema, it } = cxt;
16 if (util_1.alwaysValidSchema(it, schema))
17 return;
18 const [valid] = nullable_1.checkNullable(cxt);
19 gen.if(codegen_1.not(valid), () => gen.if(codegen_1._ `Array.isArray(${data})`, () => gen.assign(valid, code_1.validateArray(cxt)), () => cxt.error()));
20 cxt.ok(valid);
21 },
22};
23exports.default = def;
24//# sourceMappingURL=elements.js.map
Note: See TracBrowser for help on using the repository browser.