aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/json-schema.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-01-26 14:59:37 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-02 10:12:01 -0500
commit31dbeab67ce79a9c46053ce124ad3924f71b67cc (patch)
tree558cc9315cdf959068e54fbee772c33d8cc0c121 /ext/bg/js/json-schema.js
parent980a1ddf745032a790a043e8040cdb7ec5b110ad (diff)
Add validate on JsonSchema
Diffstat (limited to 'ext/bg/js/json-schema.js')
-rw-r--r--ext/bg/js/json-schema.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/bg/js/json-schema.js b/ext/bg/js/json-schema.js
index f32176fd..61bd3d43 100644
--- a/ext/bg/js/json-schema.js
+++ b/ext/bg/js/json-schema.js
@@ -532,6 +532,10 @@ class JsonSchema {
return new Proxy(target, new JsonSchemaProxyHandler(schema));
}
+ static validate(value, schema) {
+ return JsonSchemaProxyHandler.validate(value, schema);
+ }
+
static getValidValueOrDefault(schema, value) {
return JsonSchemaProxyHandler.getValidValueOrDefault(schema, value);
}