Remove custom isEqual checks from _.isEqual and custom clone checks from _.clone and simply _.clone, _.isEqual, and _.merge.

Former-commit-id: 45e90ab1494e46e281265f660c87e27f59581308
This commit is contained in:
John-David Dalton
2012-09-12 22:00:23 -07:00
parent f88ea1ee7d
commit 569caa0bf2
3 changed files with 64 additions and 118 deletions

View File

@@ -44,7 +44,6 @@
'callee',
'className',
'compareAscending',
'data',
'forIn',
'found',
'funcs',
@@ -64,13 +63,12 @@
'properties',
'property',
'propsLength',
'recursive',
'source',
'sources',
'stackA',
'stackB',
'stackLength',
'target',
'valueProp',
'values'
'valueProp'
];
/** Used to minify `compileIterator` option properties */
@@ -118,7 +116,6 @@
'chain',
'clearTimeout',
'clone',
'clones',
'collect',
'compact',
'compose',
@@ -214,9 +211,6 @@
'sortBy',
'sortedIndex',
'source',
'sources',
'stackA',
'stackB',
'tail',
'take',
'tap',
@@ -305,10 +299,10 @@
// remove debug sourceURL use in `_.template`
source = source.replace(/(?:\s*\/\/.*\n)* *if *\(useSourceURL[^}]+}/, '');
// minify internal properties used by 'compareAscending', `_.clone`, `_.isEqual`, `_.merge`, and `_.sortBy`
// minify internal properties used by 'compareAscending', `_.merge`, and `_.sortBy`
(function() {
var properties = ['clones', 'criteria', 'index', 'sources', 'thorough', 'value', 'values'],
snippets = source.match(/( +)(?:function (?:clone|compareAscending|isEqual)|var merge|var sortBy)\b[\s\S]+?\n\1}/g);
var properties = ['criteria', 'index', 'value'],
snippets = source.match(/( +)(?:function compareAscending|var merge|var sortBy)\b[\s\S]+?\n\1}/g);
if (!snippets) {
return;