1 var arrayMin = require('../internal/arrayMin'),
2 createExtremum = require('../internal/createExtremum');
5 * Gets the minimum value of `collection`. If `collection` is empty or falsey
6 * `Infinity` is returned. If an iteratee function is provided it is invoked
7 * for each value in `collection` to generate the criterion by which the value
8 * is ranked. The `iteratee` is bound to `thisArg` and invoked with three
9 * arguments: (value, index, collection).
11 * If a property name is provided for `iteratee` the created `_.property`
12 * style callback returns the property value of the given element.
14 * If a value is also provided for `thisArg` the created `_.matchesProperty`
15 * style callback returns `true` for elements that have a matching property
16 * value, else `false`.
18 * If an object is provided for `iteratee` the created `_.matches` style
19 * callback returns `true` for elements that have the properties of the given
20 * object, else `false`.
25 * @param {Array|Object|string} collection The collection to iterate over.
26 * @param {Function|Object|string} [iteratee] The function invoked per iteration.
27 * @param {*} [thisArg] The `this` binding of `iteratee`.
28 * @returns {*} Returns the minimum value.
31 * _.min([4, 2, 8, 6]);
38 * { 'user': 'barney', 'age': 36 },
39 * { 'user': 'fred', 'age': 40 }
42 * _.min(users, function(chr) {
45 * // => { 'user': 'barney', 'age': 36 }
47 * // using the `_.property` callback shorthand
48 * _.min(users, 'age');
49 * // => { 'user': 'barney', 'age': 36 }
51 var min = createExtremum(arrayMin, true);