Skip to content

Commit

Permalink
Underscore.js 1.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Dec 7, 2011
1 parent 770f087 commit 813bb57
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 77 deletions.
66 changes: 35 additions & 31 deletions docs/underscore.html

Large diffs are not rendered by default.

28 changes: 23 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ <h2>Downloads <i style="padding-left: 12px; font-size:12px;">(Right-click, and u

<table>
<tr>
<td><a href="underscore.js">Development Version (1.2.2)</a></td>
<td><a href="underscore.js">Development Version (1.2.3)</a></td>
<td><i>34kb, Uncompressed with Comments</i></td>
</tr>
<tr>
<td><a href="underscore-min.js">Production Version (1.2.2)</a></td>
<td><a href="underscore-min.js">Production Version (1.2.3)</a></td>
<td><i>&lt; 4kb, Minified and Gzipped</i></td>
</tr>
</table>
Expand Down Expand Up @@ -159,7 +159,7 @@ <h2>Table of Contents</h2>
<br />
<span class="methods"><a href="#first">first</a>, <a href="#initial">initial</a>, <a href="#last">last</a>, <a href="#rest">rest</a>,
<a href="#compact">compact</a>, <a href="#flatten">flatten</a>, <a href="#without">without</a>,
<a href="#union">union</a>, <a href="#intersection">intersection</a>, <a href="#difference">difference</a>,
<a href="#union">union</a>, <a href="#intersection">intersection</a>, <a href="#difference">difference</a>,
<a href="#uniq">uniq</a>, <a href="#zip">zip</a>, <a href="#indexOf">indexOf</a>,
<a href="#lastIndexOf">lastIndexOf</a>, <a href="#range">range</a></span>
</p>
Expand Down Expand Up @@ -620,10 +620,10 @@ <h2>Array Functions</h2>
</pre>

<p id="difference">
<b class="header">difference</b><code>_.difference(array, other)</code>
<b class="header">difference</b><code>_.difference(array, *others)</code>
<br />
Similar to <b>without</b>, but returns the values from <b>array</b> that
are not present in <b>other</b>.
are not present in the <b>other</b> arrays.
</p>
<pre>
_.difference([1, 2, 3, 4, 5], [5, 2, 10]);
Expand Down Expand Up @@ -1338,6 +1338,24 @@ <h2>Links &amp; Suggested Reading</h2>

<h2 id="changelog">Change Log</h2>

<p>
<b class="header">1.2.3</b> &mdash; <small><i>Dec. 7, 2011</i></small><br />
<ul>
<li>
Dynamic scope is now preserved for compiled <tt>_.template</tt> functions,
so you can use the value of <tt>this</tt> if you like.
</li>
<li>
Sparse array support of <tt>_.indexOf</tt>, <tt>_.lastIndexOf</tt>.
</li>
<li>
Both <tt>_.reduce</tt> and <tt>_.reduceRight</tt> can now be passed an
explicitly <tt>undefined</tt> value. (There's no reason why you'd
want to do this.)
</li>
</ul>
</p>

<p>
<b class="header">1.2.2</b> &mdash; <small><i>Nov. 14, 2011</i></small><br />
<ul>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"dependencies" : [],
"repository" : {"type": "git", "url": "git://github.com/documentcloud/underscore.git"},
"main" : "underscore.js",
"version" : "1.2.2"
"version" : "1.2.3"
}
5 changes: 0 additions & 5 deletions test/arrays.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,6 @@ $(document).ready(function() {
equals(result.join(' '), '3 4', 'takes the difference of three arrays');
});

test("arrays: symDifference", function() {
var result = _.symDifference([1, 2, 3], [2, 22, 222], [3, 33, 333], [222, 333, 444], [5]);
equals(result.join(' '), '1 22 33 444 5', 'takes the symmetric difference');
});

test('arrays: zip', function() {
var names = ['moe', 'larry', 'curly'], ages = [30, 40, 50], leaders = [true];
var stooges = _.zip(names, ages, leaders);
Expand Down
Loading

0 comments on commit 813bb57

Please sign in to comment.