aboutsummaryrefslogtreecommitdiff
path: root/sandbox/testAppNevena/Front/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js
diff options
context:
space:
mode:
authorNevena Bojovic <nenabojov@gmail.com>2022-03-01 22:05:25 +0100
committerNevena Bojovic <nenabojov@gmail.com>2022-03-01 22:05:25 +0100
commit6555fb80fdd8f6a5d201efadec3189d1244830a0 (patch)
treec1aa1c5aedc634ad1ea7fad4847884d559b51290 /sandbox/testAppNevena/Front/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js
parent7d3640f824f46490b47bd95f1c5a16644f712068 (diff)
Izbrisala bin, obj i node-modules.
Diffstat (limited to 'sandbox/testAppNevena/Front/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js')
-rw-r--r--sandbox/testAppNevena/Front/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js65
1 files changed, 0 insertions, 65 deletions
diff --git a/sandbox/testAppNevena/Front/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js b/sandbox/testAppNevena/Front/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js
deleted file mode 100644
index ad298499..00000000
--- a/sandbox/testAppNevena/Front/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js
+++ /dev/null
@@ -1,65 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const codegen_1 = require("../../compile/codegen");
-const util_1 = require("../../compile/util");
-const names_1 = require("../../compile/names");
-const error = {
- message: "must NOT have unevaluated properties",
- params: ({ params }) => (0, codegen_1._) `{unevaluatedProperty: ${params.unevaluatedProperty}}`,
-};
-const def = {
- keyword: "unevaluatedProperties",
- type: "object",
- schemaType: ["boolean", "object"],
- trackErrors: true,
- error,
- code(cxt) {
- const { gen, schema, data, errsCount, it } = cxt;
- /* istanbul ignore if */
- if (!errsCount)
- throw new Error("ajv implementation error");
- const { allErrors, props } = it;
- if (props instanceof codegen_1.Name) {
- gen.if((0, codegen_1._) `${props} !== true`, () => gen.forIn("key", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))));
- }
- else if (props !== true) {
- gen.forIn("key", data, (key) => props === undefined
- ? unevaluatedPropCode(key)
- : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key)));
- }
- it.props = true;
- cxt.ok((0, codegen_1._) `${errsCount} === ${names_1.default.errors}`);
- function unevaluatedPropCode(key) {
- if (schema === false) {
- cxt.setParams({ unevaluatedProperty: key });
- cxt.error();
- if (!allErrors)
- gen.break();
- return;
- }
- if (!(0, util_1.alwaysValidSchema)(it, schema)) {
- const valid = gen.name("valid");
- cxt.subschema({
- keyword: "unevaluatedProperties",
- dataProp: key,
- dataPropType: util_1.Type.Str,
- }, valid);
- if (!allErrors)
- gen.if((0, codegen_1.not)(valid), () => gen.break());
- }
- }
- function unevaluatedDynamic(evaluatedProps, key) {
- return (0, codegen_1._) `!${evaluatedProps} || !${evaluatedProps}[${key}]`;
- }
- function unevaluatedStatic(evaluatedProps, key) {
- const ps = [];
- for (const p in evaluatedProps) {
- if (evaluatedProps[p] === true)
- ps.push((0, codegen_1._) `${key} !== ${p}`);
- }
- return (0, codegen_1.and)(...ps);
- }
- },
-};
-exports.default = def;
-//# sourceMappingURL=unevaluatedProperties.js.map \ No newline at end of file