Skip to content

Commit f0f6a1e

Browse files
committed
Simplify deep path doc examples. [ci skip]
1 parent 6f3fb58 commit f0f6a1e

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

lodash.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12092,16 +12092,16 @@
1209212092
* @returns {boolean} Returns `true` if `path` exists, else `false`.
1209312093
* @example
1209412094
*
12095-
* var object = { 'a': { 'b': { 'c': 3 } } };
12096-
* var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });
12095+
* var object = { 'a': { 'b': 2 } };
12096+
* var other = _.create({ 'a': _.create({ 'b': 2 }) });
1209712097
*
1209812098
* _.has(object, 'a');
1209912099
* // => true
1210012100
*
12101-
* _.has(object, 'a.b.c');
12101+
* _.has(object, 'a.b');
1210212102
* // => true
1210312103
*
12104-
* _.has(object, ['a', 'b', 'c']);
12104+
* _.has(object, ['a', 'b']);
1210512105
* // => true
1210612106
*
1210712107
* _.has(other, 'a');
@@ -12123,15 +12123,15 @@
1212312123
* @returns {boolean} Returns `true` if `path` exists, else `false`.
1212412124
* @example
1212512125
*
12126-
* var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });
12126+
* var object = _.create({ 'a': _.create({ 'b': 2 }) });
1212712127
*
1212812128
* _.hasIn(object, 'a');
1212912129
* // => true
1213012130
*
12131-
* _.hasIn(object, 'a.b.c');
12131+
* _.hasIn(object, 'a.b');
1213212132
* // => true
1213312133
*
12134-
* _.hasIn(object, ['a', 'b', 'c']);
12134+
* _.hasIn(object, ['a', 'b']);
1213512135
* // => true
1213612136
*
1213712137
* _.hasIn(object, 'b');
@@ -14527,14 +14527,14 @@
1452714527
* @example
1452814528
*
1452914529
* var objects = [
14530-
* { 'a': { 'b': { 'c': _.constant(2) } } },
14531-
* { 'a': { 'b': { 'c': _.constant(1) } } }
14530+
* { 'a': { 'b': _.constant(2) } },
14531+
* { 'a': { 'b': _.constant(1) } }
1453214532
* ];
1453314533
*
14534-
* _.map(objects, _.method('a.b.c'));
14534+
* _.map(objects, _.method('a.b'));
1453514535
* // => [2, 1]
1453614536
*
14537-
* _.map(objects, _.method(['a', 'b', 'c']));
14537+
* _.map(objects, _.method(['a', 'b']));
1453814538
* // => [2, 1]
1453914539
*/
1454014540
var method = rest(function(path, args) {
@@ -14787,14 +14787,14 @@
1478714787
* @example
1478814788
*
1478914789
* var objects = [
14790-
* { 'a': { 'b': { 'c': 2 } } },
14791-
* { 'a': { 'b': { 'c': 1 } } }
14790+
* { 'a': { 'b': 2 } },
14791+
* { 'a': { 'b': 1 } }
1479214792
* ];
1479314793
*
14794-
* _.map(objects, _.property('a.b.c'));
14794+
* _.map(objects, _.property('a.b'));
1479514795
* // => [2, 1]
1479614796
*
14797-
* _.map(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');
14797+
* _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
1479814798
* // => [1, 2]
1479914799
*/
1480014800
function property(path) {

0 commit comments

Comments
 (0)