mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Optimize _.uniq and others in Firefox.
This commit is contained in:
@@ -1963,7 +1963,7 @@
|
||||
var index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
isCommon = indexOf == baseIndexOf,
|
||||
cache = isCommon && values.length >= 200 && createCache(values),
|
||||
cache = (isCommon && values.length >= 200) ? createCache(values) : null,
|
||||
valuesLength = values.length;
|
||||
|
||||
if (cache) {
|
||||
@@ -2783,7 +2783,7 @@
|
||||
length = array.length,
|
||||
isCommon = indexOf == baseIndexOf,
|
||||
isLarge = isCommon && length >= 200,
|
||||
seen = isLarge && createCache(),
|
||||
seen = isLarge ? createCache() : null,
|
||||
result = [];
|
||||
|
||||
if (seen) {
|
||||
@@ -4772,7 +4772,7 @@
|
||||
var value = arguments[argsIndex];
|
||||
if (isArray(value) || isArguments(value)) {
|
||||
args.push(value);
|
||||
caches.push(isCommon && value.length >= 120 && createCache(argsIndex && value));
|
||||
caches.push((isCommon && value.length >= 120) ? createCache(argsIndex && value) : null);
|
||||
}
|
||||
}
|
||||
argsLength = args.length;
|
||||
|
||||
Reference in New Issue
Block a user