ajv-json-logic
Version:
JSON Logic integration for Ajv validator
46 lines (44 loc) • 1.07 kB
JavaScript
var $schema = "http://json-schema.org/draft-07/schema#";
var $id = "http://jsonlogic.com/schemas/operators/array/filter.json";
var title = "filter";
var description = "You can use filter to keep only elements of the array that pass a test. Note, that inside the logic being used to map, var operations are relative to the array element being worked on.";
var type = "object";
var additionalProperties = false;
var required = [
"filter"
];
var properties = {
filter: {
$ref: "http://jsonlogic.com/schemas/common/binary-args.json"
}
};
var examples = [
{
filter: [
{
"var": "integers"
},
{
"%": [
{
"var": ""
},
2
]
}
]
}
];
var arrayFilter = {
$schema: $schema,
$id: $id,
title: title,
description: description,
type: type,
additionalProperties: additionalProperties,
required: required,
properties: properties,
examples: examples
};
export { $id, $schema, additionalProperties, arrayFilter as default, description, examples, properties, required, title, type };
//# sourceMappingURL=filter.json.js.map