UNPKG

ajv-json-logic

Version:
57 lines (55 loc) 1.33 kB
var $schema = "http://json-schema.org/draft-07/schema#"; var $id = "http://jsonlogic.com/schemas/operators/string/substr.json"; var title = "substr"; var description = "Get a portion of a string.\n\nGive a positive start position to return everything beginning at that index (Indexes of course start at zero).\nGive a negative start position to work backwards from the end of the string, then return everything.\nGive a positive length to express how many characters to return.\nGive a negative length to stop that many characters before the end."; var type = "object"; var additionalProperties = false; var required = [ "substr" ]; var properties = { substr: { $ref: "http://jsonlogic.com/schemas/common/trinary-args.json" } }; var examples = [ { substr: [ "jsonlogic", 4 ] }, { substr: [ "jsonlogic", -5 ] }, { substr: [ "jsonlogic", 1, 3 ] }, { substr: [ "jsonlogic", 4, -2 ] } ]; var stringSubstr = { $schema: $schema, $id: $id, title: title, description: description, type: type, additionalProperties: additionalProperties, required: required, properties: properties, examples: examples }; export { $id, $schema, additionalProperties, stringSubstr as default, description, examples, properties, required, title, type }; //# sourceMappingURL=substr.json.js.map