Remove constant function from examples (#3086)

This commit is contained in:
Roman Gusev
2017-03-30 22:42:45 +06:00
committed by John-David Dalton
parent 64d92ddf32
commit 43a520c971
7 changed files with 14 additions and 14 deletions

View File

@@ -14,7 +14,7 @@ import toKey from './.internal/toKey.js'
* @returns {*} Returns the resolved value.
* @example
*
* const object = { 'a': [{ 'b': { 'c1': 3, 'c2': constant(4) } }] }
* const object = { 'a': [{ 'b': { 'c1': 3, 'c2': () => 4 } }] }
*
* result(object, 'a[0].b.c1')
* // => 3
@@ -25,7 +25,7 @@ import toKey from './.internal/toKey.js'
* result(object, 'a[0].b.c3', 'default')
* // => 'default'
*
* result(object, 'a[0].b.c3', constant('default'))
* result(object, 'a[0].b.c3', () => 'default')
* // => 'default'
*/
function result(object, path, defaultValue) {