Underscore 1.0.2, with a fixed _.isArguments for Opera

This commit is contained in:
Jeremy Ashkenas
2010-03-23 11:06:11 -04:00
parent a6578068d2
commit c8858f4c8f
4 changed files with 29 additions and 23 deletions

View File

@@ -55,7 +55,7 @@
root._ = _;
// Current version.
_.VERSION = '1.0.1';
_.VERSION = '1.0.2';
// ------------------------ Collection Functions: ---------------------------
@@ -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?