aboutsummaryrefslogtreecommitdiff
path: root/node_modules/ajv/lib/keyword.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/ajv/lib/keyword.js')
-rw-r--r--node_modules/ajv/lib/keyword.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/node_modules/ajv/lib/keyword.js b/node_modules/ajv/lib/keyword.js
index 85e64c600..5fcfb75fc 100644
--- a/node_modules/ajv/lib/keyword.js
+++ b/node_modules/ajv/lib/keyword.js
@@ -14,6 +14,7 @@ module.exports = {
* @this Ajv
* @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords).
* @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
+ * @return {Ajv} this for method chaining
*/
function addKeyword(keyword, definition) {
/* jshint validthis: true */
@@ -91,6 +92,8 @@ function addKeyword(keyword, definition) {
function checkDataType(dataType) {
if (!RULES.types[dataType]) throw new Error('Unknown type ' + dataType);
}
+
+ return this;
}
@@ -111,6 +114,7 @@ function getKeyword(keyword) {
* Remove keyword
* @this Ajv
* @param {String} keyword pre-defined or custom keyword.
+ * @return {Ajv} this for method chaining
*/
function removeKeyword(keyword) {
/* jshint validthis: true */
@@ -127,4 +131,5 @@ function removeKeyword(keyword) {
}
}
}
+ return this;
}