mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 19:37:49 +00:00
Use POSITIVE_INFINITY and NEGATIVE_INFINITY more.
This commit is contained in:
@@ -7107,7 +7107,7 @@
|
|||||||
* // => [4, 1, 3, 2]
|
* // => [4, 1, 3, 2]
|
||||||
*/
|
*/
|
||||||
function shuffle(collection) {
|
function shuffle(collection) {
|
||||||
return sample(collection, Infinity);
|
return sample(collection, POSITIVE_INFINITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -11796,7 +11796,7 @@
|
|||||||
* _.max(users, 'age');
|
* _.max(users, 'age');
|
||||||
* // => { 'user': 'fred', 'age': 40 }
|
* // => { 'user': 'fred', 'age': 40 }
|
||||||
*/
|
*/
|
||||||
var max = createExtremum(gt, -Infinity);
|
var max = createExtremum(gt, NEGATIVE_INFINITY);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the minimum value of `collection`. If `collection` is empty or falsey
|
* Gets the minimum value of `collection`. If `collection` is empty or falsey
|
||||||
@@ -11845,7 +11845,7 @@
|
|||||||
* _.min(users, 'age');
|
* _.min(users, 'age');
|
||||||
* // => { 'user': 'barney', 'age': 36 }
|
* // => { 'user': 'barney', 'age': 36 }
|
||||||
*/
|
*/
|
||||||
var min = createExtremum(lt, Infinity);
|
var min = createExtremum(lt, POSITIVE_INFINITY);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the sum of the values in `collection`.
|
* Gets the sum of the values in `collection`.
|
||||||
|
|||||||
Reference in New Issue
Block a user