Skip to content

Commit

Permalink
Fixes jashkenas#772 -- elevate the official underscore method as 'con…
Browse files Browse the repository at this point in the history
…tains' instead of 'include'
  • Loading branch information
jashkenas committed Sep 20, 2012
1 parent cf0de25 commit 367422b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions index.html
Expand Up @@ -199,7 +199,7 @@
<li>- <a href="#reject">reject</a></li>
<li>- <a href="#all">all</a></li>
<li>- <a href="#any">any</a></li>
<li>- <a href="#include">include</a></li>
<li>- <a href="#contains">contains</a></li>
<li>- <a href="#invoke">invoke</a></li>
<li>- <a href="#pluck">pluck</a></li>
<li>- <a href="#max">max</a></li>
Expand Down Expand Up @@ -514,15 +514,15 @@ <h2 id="collections">Collection Functions (Arrays or Objects)</h2>
=&gt; true
</pre>

<p id="include">
<b class="header">include</b><code>_.include(list, value)</code>
<span class="alias">Alias: <b>contains</b></span>
<p id="contains">
<b class="header">contains</b><code>_.contains(list, value)</code>
<span class="alias">Alias: <b>include</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.
</p>
<pre>
_.include([1, 2, 3], 3);
_.contains([1, 2, 3], 3);
=&gt; true
</pre>

Expand Down

0 comments on commit 367422b

Please sign in to comment.