Ensure _.isEqual works correctly for objects from another document and add _.clone benchmark.

Former-commit-id: b1ef745ec6c24e8ea0c8fae304ead80c60dfd5aa
This commit is contained in:
John-David Dalton
2012-07-29 00:58:23 -07:00
parent 943004844a
commit 86bd847bf9
5 changed files with 173 additions and 93 deletions

View File

@@ -881,14 +881,17 @@
});
// remove JScript [[DontEnum]] fix from `_.isEqual`
source = source.replace(/(?:\s*\/\/.*)*\n( +)if *\(result *&& *hasDontEnumBug[\s\S]+?\n\1}/, '');
source = source.replace(/(?:\s*\/\/.*)*\n( +)if *\(hasDontEnumBug[\s\S]+?\n\1}/, '');
// remove IE `shift` and `splice` fix from mutator Array functions mixin
source = source.replace(/(?:\s*\/\/.*)*\n( +)if *\(value.length *=== *0[\s\S]+?\n\1}/, '');
// remove `noArgsClass` from `_.clone` and `_.size`
// remove `noArgsClass` from `_.clone`, `_.isEqual`, and `_.size`
source = source.replace(/ *\|\| *\(noArgsClass *&[^)]+?\)\)/g, '');
// remove `noArgsClass` from `_.isEqual`
source = source.replace(/if *\(noArgsClass[^}]+?}\n/, '');
// remove `noArraySliceOnStrings` from `_.toArray`
source = source.replace(/noArraySliceOnStrings *\?[^:]+: *([^)]+)/g, '$1');