From 291803c31f829fe0d32bb3207bc11def95a7408c Mon Sep 17 00:00:00 2001 From: Nevena Bojovic Date: Tue, 1 Mar 2022 20:05:50 +0100 Subject: Urađena test aplikacija. Povezan front i back. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vocabularies/validation/limitProperties.js | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 sandbox/testAppNevena/Front/node_modules/ajv/dist/vocabularies/validation/limitProperties.js (limited to 'sandbox/testAppNevena/Front/node_modules/ajv/dist/vocabularies/validation/limitProperties.js') diff --git a/sandbox/testAppNevena/Front/node_modules/ajv/dist/vocabularies/validation/limitProperties.js b/sandbox/testAppNevena/Front/node_modules/ajv/dist/vocabularies/validation/limitProperties.js new file mode 100644 index 00000000..b4c0ecd7 --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/ajv/dist/vocabularies/validation/limitProperties.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const codegen_1 = require("../../compile/codegen"); +const error = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxProperties" ? "more" : "fewer"; + return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} items`; + }, + params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`, +}; +const def = { + keyword: ["maxProperties", "minProperties"], + type: "object", + schemaType: "number", + $data: true, + error, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT; + cxt.fail$data((0, codegen_1._) `Object.keys(${data}).length ${op} ${schemaCode}`); + }, +}; +exports.default = def; +//# sourceMappingURL=limitProperties.js.map \ No newline at end of file -- cgit v1.2.3