Skip to content

Commit

Permalink
Document the lame in _.includes
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Feb 20, 2015
1 parent 4fae741 commit bf8e5b5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -619,11 +619,12 @@ <h2 id="collections">Collection Functions (Arrays or Objects)</h2>
</pre>

<p id="contains">
<b class="header">contains</b><code>_.contains(list, value)</code>
<span class="alias">Alias: <b>include</b></span>
<b class="header">contains</b><code>_.contains(list, value, [fromIndex])</code>
<span class="alias">Alias: <b>includes</b></span>
<br />
Returns <i>true</i> if the <b>value</b> is present in the <b>list</b>.
Uses <b>indexOf</b> internally, if <b>list</b> is an Array.
Uses <b>indexOf</b> internally, if <b>list</b> is an Array.
Use <b>fromIndex</b> to start your search at a given index.
</p>
<pre>
_.contains([1, 2, 3], 3);
Expand Down

0 comments on commit bf8e5b5

Please sign in to comment.