Add notes about Infinity and -Infinity to _.min and _.max docs.

This commit is contained in:
John-David Dalton
2013-09-17 22:54:42 -07:00
parent 70147396a4
commit 27976cbe1a
7 changed files with 188 additions and 176 deletions

View File

@@ -2171,10 +2171,11 @@
}
/**
* Retrieves the maximum value of an array. If a callback is provided it
* will be executed for each value in the array to generate the criterion by
* which the value is ranked. The callback is bound to `thisArg` and invoked
* with three arguments; (value, index, collection).
* Retrieves the maximum value of a collection. If the collection is empty or
* falsey `-Infinity` is returned. If a callback is provided it will be executed
* for each value in the collection to generate the criterion by which the value
* is ranked. The callback is bound to `thisArg` and invoked with three
* arguments; (value, index, collection).
*
* If a property name is provided for `callback` the created "_.pluck" style
* callback will return the property value of the given element.
@@ -2238,10 +2239,11 @@
}
/**
* Retrieves the minimum value of an array. If a callback is provided it
* will be executed for each value in the array to generate the criterion by
* which the value is ranked. The callback is bound to `thisArg` and invoked
* with three arguments; (value, index, collection).
* Retrieves the minimum value of a collection. If the collection is empty or
* falsey `Infinity` is returned. If a callback is provided it will be executed
* for each value in the collection to generate the criterion by which the value
* is ranked. The callback is bound to `thisArg` and invoked with three
* arguments; (value, index, collection).
*
* If a property name is provided for `callback` the created "_.pluck" style
* callback will return the property value of the given element.