Skip to content

Commit

Permalink
Underscore 1.0.2, with a fixed _.isArguments for Opera
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Mar 23, 2010
1 parent a657806 commit c8858f4
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 23 deletions.
10 changes: 8 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ <h2>Downloads <i style="padding-left: 12px; font-size:12px;">(Right-click, and u
<p>
<table>
<tr>
<td><a href="underscore.js">Development Version (1.0.1)</a></td>
<td><a href="underscore.js">Development Version (1.0.2)</a></td>
<td><i>25kb, Uncompressed with Comments</i></td>
</tr>
<tr>
<td><a href="underscore-min.js">Production Version (1.0.1)</a></td>
<td><a href="underscore-min.js">Production Version (1.0.2)</a></td>
<td><i>2.5kb, Packed and Gzipped</i></td>
</tr>
</table>
Expand Down Expand Up @@ -1136,6 +1136,12 @@ <h2>Links &amp; Suggested Reading</h2>

<h2>Change Log</h2>

<p>
<b class="header">1.0.2</b><br />
Fixes <tt>_.isArguments</tt> in recent versions of Opera, which have
arguments objects as real Arrays.
</p>

<p>
<b class="header">1.0.1</b><br />
Bugfix for <tt>_.isEqual</tt>, when comparing two objects with the same
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"contributors" : [],
"dependencies" : [],
"lib" : ".",
"version" : "1.0.1"
"version" : "1.0.2"
}
34 changes: 17 additions & 17 deletions underscore-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
root._ = _;

// Current version.
_.VERSION = '1.0.1';
_.VERSION = '1.0.2';

// ------------------------ Collection Functions: ---------------------------

Expand Down Expand Up @@ -504,12 +504,12 @@
// Is a given value an array?
// Delegates to ECMA5's native Array.isArray
_.isArray = nativeIsArray || function(obj) {
return !!(obj && obj.concat && obj.unshift);
return !!(obj && obj.concat && obj.unshift && !obj.callee);
};

// Is a given variable an arguments object?
_.isArguments = function(obj) {
return obj && _.isNumber(obj.length) && !obj.concat && !obj.substr && !obj.apply && !propertyIsEnumerable.call(obj, 'length');
return obj && obj.callee;
};

// Is a given value a function?
Expand Down

0 comments on commit c8858f4

Please sign in to comment.