UNPKG

ajv-json-logic

Version:
74 lines (70 loc) 1.81 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var $schema = "http://json-schema.org/draft-07/schema#"; var $id = "http://jsonlogic.com/schemas/common/var.json"; var title = "Var"; var description = "Retrieve data from the provided data object."; var oneOf = [ { type: "array", items: [ { oneOf: [ { $ref: "http://jsonlogic.com/schemas/common/pointer.json" }, { $ref: "http://jsonlogic.com/schemas/operators/logic/if.json" } ] }, { $ref: "http://jsonlogic.com/schemas/common/all-types.json", title: "Default", description: "You can supply a default, as the second argument, for values that might be missing in the data object." } ] }, { $ref: "http://jsonlogic.com/schemas/operators/array/map.json" }, { $ref: "http://jsonlogic.com/schemas/operators/array/merge.json" }, { $ref: "http://jsonlogic.com/schemas/operators/array/filter.json" }, { $ref: "http://jsonlogic.com/schemas/operators/array/reduce.json" }, { $ref: "http://jsonlogic.com/schemas/common/pointer.json", title: "Shortcut", description: "If you like, we support syntactic sugar to skip the array around single arguments." }, { type: "string", "const": "", title: "Entire data object", description: "You can also use var with an empty string to get the entire data object – which is really useful in map, filter, and reduce rules." }, { type: "null", title: "Null", description: "Unknown null." } ]; var varSchema = { $schema: $schema, $id: $id, title: title, description: description, oneOf: oneOf }; exports.$id = $id; exports.$schema = $schema; exports.default = varSchema; exports.description = description; exports.oneOf = oneOf; exports.title = title; //# sourceMappingURL=var.json.cjs.map