ajv-json-logic
Version:
JSON Logic integration for Ajv validator
70 lines (66 loc) • 1.58 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
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
};
exports.$id = $id;
exports.$schema = $schema;
exports.additionalProperties = additionalProperties;
exports.default = stringSubstr;
exports.description = description;
exports.examples = examples;
exports.properties = properties;
exports.required = required;
exports.title = title;
exports.type = type;
//# sourceMappingURL=substr.json.cjs.map