diff --git a/CUSTOM.md b/CUSTOM.md index 8fb74ecb5..6d32f40bf 100644 --- a/CUSTOM.md +++ b/CUSTOM.md @@ -288,6 +288,11 @@ it.util.toHash(['a', 'b', 'c']) // { a: true, b: true, c: true } ``` +##### .equal(value1, value2) -> Boolean + +Performs deep equality comparison. This function is used in keywords `enum`, `constant`, `uniqueItems` and can be used in custom keywords. + + ##### .getProperty(String key) -> String Converts the string that is the key/index to access the property/item to the JavaScript syntax to access the property (either "." notation or "[...]" notation). diff --git a/lib/compile/util.js b/lib/compile/util.js index ec56b42fc..bc77664cc 100644 --- a/lib/compile/util.js +++ b/lib/compile/util.js @@ -9,6 +9,7 @@ module.exports = { toHash: toHash, getProperty: getProperty, escapeQuotes: escapeQuotes, + equal: require('./equal'), ucs2length: require('./ucs2length'), varOccurences: varOccurences, varReplace: varReplace,