From a98fc802fcbc21f7d59a6a3d9e65ce042f4f1b23 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Mon, 11 Jan 2016 16:13:23 -0800 Subject: [PATCH] Cleanup `_.maxBy` and `_.minBy` doc example. [ci skip] --- lodash.js | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/lodash.js b/lodash.js index 3b8860185..24ad261cf 100644 --- a/lodash.js +++ b/lodash.js @@ -13634,17 +13634,14 @@ * @returns {*} Returns the maximum value. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } - * ]; + * var objects = [{ 'n': 1 }, { 'n': 2 }]; * - * _.maxBy(users, function(o) { return o.age; }); - * // => { 'user': 'fred', 'age': 40 } + * _.maxBy(objects, function(o) { return o.a; }); + * // => { 'n': 2 } * * // using the `_.property` iteratee shorthand - * _.maxBy(users, 'age'); - * // => { 'user': 'fred', 'age': 40 } + * _.maxBy(objects, 'n'); + * // => { 'n': 2 } */ function maxBy(array, iteratee) { return (array && array.length) @@ -13705,17 +13702,14 @@ * @returns {*} Returns the minimum value. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } - * ]; + * var objects = [{ 'n': 1 }, { 'n': 2 }]; * - * _.minBy(users, function(o) { return o.age; }); - * // => { 'user': 'barney', 'age': 36 } + * _.minBy(objects, function(o) { return o.a; }); + * // => { 'n': 1 } * * // using the `_.property` iteratee shorthand - * _.minBy(users, 'age'); - * // => { 'user': 'barney', 'age': 36 } + * _.minBy(objects, 'n'); + * // => { 'n': 1 } */ function minBy(array, iteratee) { return (array && array.length)