Optimize lodash function to avoid slow path for arrays.

Former-commit-id: 24e2c4ac2525ae38e214fdb0ea8e3ab664d784b7
This commit is contained in:
John-David Dalton
2013-03-09 18:24:29 -08:00
parent 31e4e631f9
commit ee4542a699
8 changed files with 164 additions and 159 deletions

View File

@@ -169,7 +169,7 @@
'union': ['uniq'],
'uniq': ['createCallback', 'indexOf'],
'uniqueId': [],
'value': ['forOwn'],
'value': ['forOwn', 'isArray'],
'values': ['keys'],
'where': ['filter'],
'without': ['indexOf'],
@@ -1723,6 +1723,7 @@
dependencyMap.pick = _.without(dependencyMap.pick, 'forIn', 'isObject');
dependencyMap.reduceRight = _.without(dependencyMap.reduceRight, 'isString');
dependencyMap.template = _.without(dependencyMap.template, 'keys', 'values');
dependencyMap.value = _.without(dependencyMap.value, 'isArray');
dependencyMap.where.push('find', 'isEmpty');
if (useUnderscoreClone) {