mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Update _.result doc example. [ci skip]
This commit is contained in:
@@ -11255,10 +11255,10 @@
|
|||||||
* _.result(object, 'a[0].b.c2');
|
* _.result(object, 'a[0].b.c2');
|
||||||
* // => 4
|
* // => 4
|
||||||
*
|
*
|
||||||
* _.result(object, 'a.b.c', 'default');
|
* _.result(object, 'a[0].b.c3', 'default');
|
||||||
* // => 'default'
|
* // => 'default'
|
||||||
*
|
*
|
||||||
* _.result(object, 'a.b.c', _.constant('default'));
|
* _.result(object, 'a[0].b.c3', _.constant('default'));
|
||||||
* // => 'default'
|
* // => 'default'
|
||||||
*/
|
*/
|
||||||
function result(object, path, defaultValue) {
|
function result(object, path, defaultValue) {
|
||||||
|
|||||||
Reference in New Issue
Block a user