Permalink
Browse files

Underscore 1.4.3

  • Loading branch information...
1 parent b1f1037 commit 78887cffb53ed372811b5cc1239e0ecdf701a5c8 @jashkenas committed Dec 4, 2012
Showing with 112 additions and 76 deletions.
  1. +2 −7 Rakefile
  2. +73 −52 docs/underscore.html
  3. +30 −5 index.html
  4. +1 −1 package.json
  5. +1 −1 test/index.html
  6. +1 −5 underscore-min.js
  7. +4 −5 underscore.js
View
@@ -1,11 +1,6 @@
-require 'rubygems'
-require 'uglifier'
-
-desc "Use the Closure Compiler to compress Underscore.js"
+desc "Use Uglify JS to compress Underscore.js"
task :build do
- source = File.read('underscore.js')
- min = Uglifier.compile(source)
- File.open('underscore-min.js', 'w') {|f| f.write min }
+ sh "uglifyjs underscore.js -c -m -o underscore-min.js"
end
desc "Build the docco documentation"
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -179,7 +179,7 @@
<div id="sidebar" class="interface">
<a class="toc_title" href="#">
- Underscore.js <span class="version">(1.4.2)</span>
+ Underscore.js <span class="version">(1.4.3)</span>
</a>
<a class="toc_title" href="#">
@@ -374,11 +374,11 @@
<table>
<tr>
- <td><a href="underscore.js">Development Version (1.4.2)</a></td>
+ <td><a href="underscore.js">Development Version (1.4.3)</a></td>
<td><i>40kb, Uncompressed with Plentiful Comments</i></td>
</tr>
<tr>
- <td><a href="underscore-min.js">Production Version (1.4.2)</a></td>
+ <td><a href="underscore-min.js">Production Version (1.4.3)</a></td>
<td><i>4kb, Minified and Gzipped</i></td>
</tr>
<tr>
@@ -1763,7 +1763,32 @@ <h2 id="links">Links &amp; Suggested Reading</h2>
<h2 id="changelog">Change Log</h2>
<p>
- <b class="header">1.4.2</b> &mdash; <small><i>Oct. 1, 2012</i></small> &mdash; <a href="https://github.com/documentcloud/underscore/compare/1.4.1...1.4.2">Diff</a><br />
+ <b class="header">1.4.3</b> &mdash; <small><i>Dec. 4, 2012</i></small> &mdash; <a href="https://github.com/documentcloud/underscore/compare/1.4.2...1.4.3">Diff</a><br />
+ <ul>
+ <li>
+ Improved Underscore compatibility with Adobe's JS engine that can be
+ used to script Illustrator, Photoshop, and friends.
+ </li>
+ <li>
+ Added a default <tt>_.identity</tt> iterator to <tt>countBy</tt> and
+ <tt>groupBy</tt>.
+ </li>
+ <li>
+ The <tt>uniq</tt> function can now take <tt>array, iterator, context</tt>
+ as the argument list.
+ </li>
+ <li>
+ The <tt>times</tt> function now returns the mapped array of iterator
+ results.
+ </li>
+ <li>
+ Simplified and fixed bugs in <tt>throttle</tt>.
+ </li>
+ </ul>
+ </p>
+
+ <p>
+ <b class="header">1.4.2</b> &mdash; <small><i>Oct. 1, 2012</i></small> &mdash; <a href="https://github.com/documentcloud/underscore/compare/1.4.1...1.4.2">Diff</a><br />
<ul>
<li>
For backwards compatibility, returned to pre-1.4.0 behavior when
@@ -1774,7 +1799,7 @@ <h2 id="changelog">Change Log</h2>
</p>
<p>
- <b class="header">1.4.1</b> &mdash; <small><i>Oct. 1, 2012</i></small> &mdash; <a href="https://github.com/documentcloud/underscore/compare/1.4.0...1.4.1">Diff</a><br />
+ <b class="header">1.4.1</b> &mdash; <small><i>Oct. 1, 2012</i></small> &mdash; <a href="https://github.com/documentcloud/underscore/compare/1.4.0...1.4.1">Diff</a><br />
<ul>
<li>
Fixed a 1.4.0 regression in the <tt>lastIndexOf</tt> function.
View
@@ -6,5 +6,5 @@
"author" : "Jeremy Ashkenas <jeremy@documentcloud.org>",
"repository" : {"type": "git", "url": "git://github.com/documentcloud/underscore.git"},
"main" : "underscore.js",
- "version" : "1.4.2"
+ "version" : "1.4.3"
}
View
@@ -6,7 +6,7 @@
<script src="vendor/jquery.js"></script>
<script src="vendor/qunit.js"></script>
<script src="vendor/jslitmus.js"></script>
- <script src="../underscore.js"></script>
+ <script src="../underscore-min.js"></script>
<script src="collections.js"></script>
<script src="arrays.js"></script>
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,4 +1,4 @@
-// Underscore.js 1.4.2
+// Underscore.js 1.4.3
// http://underscorejs.org
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore may be freely distributed under the MIT license.
@@ -24,7 +24,6 @@
var push = ArrayProto.push,
slice = ArrayProto.slice,
concat = ArrayProto.concat,
- unshift = ArrayProto.unshift,
toString = ObjProto.toString,
hasOwnProperty = ObjProto.hasOwnProperty;
@@ -65,7 +64,7 @@
}
// Current version.
- _.VERSION = '1.4.2';
+ _.VERSION = '1.4.3';
// Collection Functions
// --------------------
@@ -338,7 +337,7 @@
// either a string attribute to count by, or a function that returns the
// criterion.
_.countBy = function(obj, value, context) {
- return group(obj, value, context, function(result, key, value) {
+ return group(obj, value, context, function(result, key) {
if (!_.has(result, key)) result[key] = 0;
result[key]++;
});
@@ -963,7 +962,7 @@
// Is a given object a finite number?
_.isFinite = function(obj) {
- return isFinite( obj ) && !isNaN( parseFloat(obj) );
+ return isFinite(obj) && !isNaN(parseFloat(obj));
};
// Is the given value `NaN`? (NaN is the only number which does not equal itself).

0 comments on commit 78887cf

Please sign in to comment.