Skip to content

Commit 813bb57

Browse files
committed
Underscore.js 1.2.3
1 parent 770f087 commit 813bb57

File tree

6 files changed

+86
-77
lines changed

6 files changed

+86
-77
lines changed

docs/underscore.html

Lines changed: 35 additions & 31 deletions
Large diffs are not rendered by default.

index.html

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ <h2>Downloads <i style="padding-left: 12px; font-size:12px;">(Right-click, and u
126126

127127
<table>
128128
<tr>
129-
<td><a href="underscore.js">Development Version (1.2.2)</a></td>
129+
<td><a href="underscore.js">Development Version (1.2.3)</a></td>
130130
<td><i>34kb, Uncompressed with Comments</i></td>
131131
</tr>
132132
<tr>
133-
<td><a href="underscore-min.js">Production Version (1.2.2)</a></td>
133+
<td><a href="underscore-min.js">Production Version (1.2.3)</a></td>
134134
<td><i>&lt; 4kb, Minified and Gzipped</i></td>
135135
</tr>
136136
</table>
@@ -159,7 +159,7 @@ <h2>Table of Contents</h2>
159159
<br />
160160
<span class="methods"><a href="#first">first</a>, <a href="#initial">initial</a>, <a href="#last">last</a>, <a href="#rest">rest</a>,
161161
<a href="#compact">compact</a>, <a href="#flatten">flatten</a>, <a href="#without">without</a>,
162-
<a href="#union">union</a>, <a href="#intersection">intersection</a>, <a href="#difference">difference</a>,
162+
<a href="#union">union</a>, <a href="#intersection">intersection</a>, <a href="#difference">difference</a>,
163163
<a href="#uniq">uniq</a>, <a href="#zip">zip</a>, <a href="#indexOf">indexOf</a>,
164164
<a href="#lastIndexOf">lastIndexOf</a>, <a href="#range">range</a></span>
165165
</p>
@@ -620,10 +620,10 @@ <h2>Array Functions</h2>
620620
</pre>
621621

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

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

1341+
<p>
1342+
<b class="header">1.2.3</b> &mdash; <small><i>Dec. 7, 2011</i></small><br />
1343+
<ul>
1344+
<li>
1345+
Dynamic scope is now preserved for compiled <tt>_.template</tt> functions,
1346+
so you can use the value of <tt>this</tt> if you like.
1347+
</li>
1348+
<li>
1349+
Sparse array support of <tt>_.indexOf</tt>, <tt>_.lastIndexOf</tt>.
1350+
</li>
1351+
<li>
1352+
Both <tt>_.reduce</tt> and <tt>_.reduceRight</tt> can now be passed an
1353+
explicitly <tt>undefined</tt> value. (There's no reason why you'd
1354+
want to do this.)
1355+
</li>
1356+
</ul>
1357+
</p>
1358+
13411359
<p>
13421360
<b class="header">1.2.2</b> &mdash; <small><i>Nov. 14, 2011</i></small><br />
13431361
<ul>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
"dependencies" : [],
99
"repository" : {"type": "git", "url": "git://github.com/documentcloud/underscore.git"},
1010
"main" : "underscore.js",
11-
"version" : "1.2.2"
11+
"version" : "1.2.3"
1212
}

test/arrays.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,6 @@ $(document).ready(function() {
115115
equals(result.join(' '), '3 4', 'takes the difference of three arrays');
116116
});
117117

118-
test("arrays: symDifference", function() {
119-
var result = _.symDifference([1, 2, 3], [2, 22, 222], [3, 33, 333], [222, 333, 444], [5]);
120-
equals(result.join(' '), '1 22 33 444 5', 'takes the symmetric difference');
121-
});
122-
123118
test('arrays: zip', function() {
124119
var names = ['moe', 'larry', 'curly'], ages = [30, 40, 50], leaders = [true];
125120
var stooges = _.zip(names, ages, leaders);

0 commit comments

Comments
 (0)