source: imaps-frontend/node_modules/ajv-keywords/dist/index.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 985 bytes
RevLine 
[79a0317]1"use strict";
2var __importDefault = (this && this.__importDefault) || function (mod) {
3 return (mod && mod.__esModule) ? mod : { "default": mod };
4};
5Object.defineProperty(exports, "__esModule", { value: true });
6const keywords_1 = __importDefault(require("./keywords"));
7const ajvKeywords = (ajv, keyword) => {
8 if (Array.isArray(keyword)) {
9 for (const k of keyword)
10 get(k)(ajv);
11 return ajv;
12 }
13 if (keyword) {
14 get(keyword)(ajv);
15 return ajv;
16 }
17 for (keyword in keywords_1.default)
18 get(keyword)(ajv);
19 return ajv;
20};
21ajvKeywords.get = get;
22function get(keyword) {
23 const defFunc = keywords_1.default[keyword];
24 if (!defFunc)
25 throw new Error("Unknown keyword " + keyword);
26 return defFunc;
27}
28exports.default = ajvKeywords;
29module.exports = ajvKeywords;
30// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
31module.exports.default = ajvKeywords;
32//# sourceMappingURL=index.js.map
Note: See TracBrowser for help on using the repository browser.