summaryrefslogtreecommitdiff
path: root/app/node_modules/okschema
diff options
context:
space:
mode:
Diffstat (limited to 'app/node_modules/okschema')
-rw-r--r--app/node_modules/okschema/index.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/app/node_modules/okschema/index.js b/app/node_modules/okschema/index.js
index 1ffe2d6..d63f5db 100644
--- a/app/node_modules/okschema/index.js
+++ b/app/node_modules/okschema/index.js
@@ -16,13 +16,17 @@ function OKSchema(spec) {
}
OKSchema.prototype.assertValid = function(data) {
- var result = mschema.validate(data, this._spec);
+ var result = mschema.validate(data, this.toMschema());
if (!result.valid)
throw result.errors;
};
-OKSchema.prototype.getMschema = function() {
- return this._spec;
+/**
+ * Return schema as an mschema object.
+ * Currently no difference between the two.
+ */
+OKSchema.prototype.toMschema = function() {
+ return this.spec;
};
module.exports = OKSchema;