From 5262c9f6bd2d16bd6368171ea9e41d47fe6c3fcc Mon Sep 17 00:00:00 2001 From: Jonathan Guillotte-Blouin Date: Tue, 19 Jul 2016 18:33:08 -0400 Subject: [PATCH] fix errors in CUSTOM doc --- CUSTOM.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CUSTOM.md b/CUSTOM.md index e110ad9..9c9e781 100644 --- a/CUSTOM.md +++ b/CUSTOM.md @@ -253,10 +253,10 @@ it.util.toHash(['a', 'b', 'c']) // { a: true, b: true, c: true } 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). ```javascript -it.util.toHash('a') // ".a" -it.util.toHash('1') // "['1']" -it.util.toHash("a'b") // "['a\\'b']" -it.util.toHash(1) // "[1]" +it.util.getProperty('a') // ".a" +it.util.getProperty('1') // "['1']" +it.util.getProperty("a'b") // "['a\\'b']" +it.util.getProperty(1) // "[1]" ``` @@ -288,7 +288,7 @@ it.util.toQuotedString("a'b") // "'a\\'b'" Returns the validation-time expression to safely access data based on the passed [relative json pointer](https://tools.ietf.org/html/draft-luff-relative-json-pointer-00) (See [examples](https://gist.github.com/geraintluff/5911303)). ```javascript -it.getData('2/test/1', it.dataLevel, it.dataPathArr) +it.util.getData('2/test/1', it.dataLevel, it.dataPathArr) // The result depends on the current level // if it.dataLevel is 3 the result is "data1 && data1.test && data1.test[1]" ```