Make _.isEqual work with arguments objects in older versions of Opera.

Former-commit-id: 860a27e7f81e14781eb371cadf24bb812eb31718
This commit is contained in:
John-David Dalton
2012-12-03 01:54:46 -08:00
parent 9bccc9c53c
commit 12b0186f5a
5 changed files with 3873 additions and 128 deletions

View File

@@ -87,7 +87,7 @@
'find': ['forEach'],
'first': [],
'flatten': ['isArray'],
'forEach': ['identity', 'isString'],
'forEach': ['identity', 'isArguments', 'isString'],
'forIn': ['identity', 'isArguments'],
'forOwn': ['identity', 'isArguments'],
'functions': ['forIn', 'isFunction'],
@@ -105,7 +105,7 @@
'isDate': [],
'isElement': [],
'isEmpty': ['forOwn', 'isArguments', 'isFunction'],
'isEqual': ['forIn', 'isFunction'],
'isEqual': ['forIn', 'isArguments', 'isFunction'],
'isFinite': [],
'isFunction': [],
'isNaN': ['isNumber'],
@@ -759,6 +759,11 @@
return match.replace(/ *\|\| *\(noArgsClass *&&[^)]+?\)\)/g, '');
});
// remove `noArgsClass` from `_.isEqual`
source = source.replace(matchFunction(source, 'isEqual'), function(match) {
return match.replace(/noArgsClass[^:]+:\s*/g, '');
});
return source;
}