main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
673 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
3 | function getDef() {
|
---|
4 | return {
|
---|
5 | keyword: "prohibited",
|
---|
6 | type: "object",
|
---|
7 | schemaType: "array",
|
---|
8 | macro: function (schema) {
|
---|
9 | if (schema.length === 0)
|
---|
10 | return true;
|
---|
11 | if (schema.length === 1)
|
---|
12 | return { not: { required: schema } };
|
---|
13 | return { not: { anyOf: schema.map((p) => ({ required: [p] })) } };
|
---|
14 | },
|
---|
15 | metaSchema: {
|
---|
16 | type: "array",
|
---|
17 | items: { type: "string" },
|
---|
18 | },
|
---|
19 | };
|
---|
20 | }
|
---|
21 | exports.default = getDef;
|
---|
22 | module.exports = getDef;
|
---|
23 | //# sourceMappingURL=prohibited.js.map |
---|
Note:
See
TracBrowser
for help on using the repository browser.