Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add a link to iteratee
  • Loading branch information
jgonggrijp committed May 7, 2020
commit bff968b756d1f789f0fc912c6f60056d75c39c8d
21 changes: 11 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2461,16 +2461,17 @@ <h2 id="notes">Notes</h2>
</li>
<li>
Pick a target type, i.e., either string or number, and pass an
<tt>iteratee</tt> to your Underscore function that will convert its
argument to a sensible instance of the target type. For example, if
you have an array of numbers that you want to sort and that may
occasionally contain <tt>null</tt> or <tt>undefined</tt>, you can
control whether you want to sort these before or after all numbers
by passing an <tt>iteratee</tt> to <tt>_.sortBy</tt> that returns
<tt>-Infinity</tt> or <tt>+Infinity</tt> for such values,
respectively. Or maybe you want to treat them as zeros; it is up to
you. The same <tt>iteratee</tt> can also be passed to other
Underscore functions to ensure that the behavior is consistent.
<a href="#iteratee"><tt>iteratee</tt></a> to your Underscore
function that will convert its argument to a sensible instance of
the target type. For example, if you have an array of numbers that
you want to sort and that may occasionally contain <tt>null</tt> or
<tt>undefined</tt>, you can control whether you want to sort these
before or after all numbers by passing an <tt>iteratee</tt> to
<tt>_.sortBy</tt> that returns <tt>-Infinity</tt> or
<tt>+Infinity</tt> for such values, respectively. Or maybe you want
to treat them as zeros; it is up to you. The same <tt>iteratee</tt>
can also be passed to other Underscore functions to ensure that the
behavior is consistent.
</li>
</ul>
</p>
Expand Down