Skip to content

Commit

Permalink
Improve documentation for min and max
Browse files Browse the repository at this point in the history
* Remove ambiguous wording "If iterator is passed" since iterator functions are
  often predicates that pass or fail
* Remove other occurences of similar ambiguous wording in documentation
  • Loading branch information
David Sanders committed Aug 1, 2013
1 parent cceb54a commit f521837
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,9 @@ <h2 id="collections">Collection Functions (Arrays or Objects)</h2>
<p id="max">
<b class="header">max</b><code>_.max(list, [iterator], [context])</code>
<br />
Returns the maximum value in <b>list</b>. If <b>iterator</b> is passed,
it will be used on each value to generate the criterion by which the
value is ranked.
Returns the maximum value in <b>list</b>. If an <b>iterator</b>
function is provided, it will be used on each value to generate the
criterion by which the value is ranked.
</p>
<pre>
var stooges = [{name : 'moe', age : 40}, {name : 'larry', age : 50}, {name : 'curly', age : 60}];
Expand All @@ -624,9 +624,9 @@ <h2 id="collections">Collection Functions (Arrays or Objects)</h2>
<p id="min">
<b class="header">min</b><code>_.min(list, [iterator], [context])</code>
<br />
Returns the minimum value in <b>list</b>. If <b>iterator</b> is passed,
it will be used on each value to generate the criterion by which the
value is ranked.
Returns the minimum value in <b>list</b>. If an <b>iterator</b>
function is provided, it will be used on each value to generate the
criterion by which the value is ranked.
</p>
<pre>
var numbers = [10, 5, 100, 2, 1000];
Expand Down Expand Up @@ -917,7 +917,7 @@ <h2 id="arrays">Array Functions</h2>
<br />
Uses a binary search to determine the index at which the <b>value</b>
<i>should</i> be inserted into the <b>list</b> in order to maintain the <b>list</b>'s
sorted order. If an <b>iterator</b> is passed, it will be used to compute
sorted order. If an <b>iterator</b> function is provided, it will be used to compute
the sort ranking of each value, including the <b>value</b> you pass.
Iterator may also be the string name of the property to sort by (eg. <tt>length</tt>).
</p>
Expand Down

0 comments on commit f521837

Please sign in to comment.