mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Minor ternary formatting.
This commit is contained in:
20
lodash.js
20
lodash.js
@@ -3423,9 +3423,7 @@
|
|||||||
? arrayPush(baseDifferenceBy(result, arrays[index], iteratee), baseDifferenceBy(arrays[index], result, iteratee))
|
? arrayPush(baseDifferenceBy(result, arrays[index], iteratee), baseDifferenceBy(arrays[index], result, iteratee))
|
||||||
: arrays[index];
|
: arrays[index];
|
||||||
}
|
}
|
||||||
return (result && result.length)
|
return (result && result.length) ? baseUniqBy(result, iteratee) : [];
|
||||||
? baseUniqBy(result, iteratee)
|
|
||||||
: [];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -4239,9 +4237,7 @@
|
|||||||
|
|
||||||
case numberTag:
|
case numberTag:
|
||||||
// Treat `NaN` vs. `NaN` as equal.
|
// Treat `NaN` vs. `NaN` as equal.
|
||||||
return (object != +object)
|
return (object != +object) ? other != +other : object == +other;
|
||||||
? other != +other
|
|
||||||
: object == +other;
|
|
||||||
|
|
||||||
case regexpTag:
|
case regexpTag:
|
||||||
case stringTag:
|
case stringTag:
|
||||||
@@ -7344,9 +7340,7 @@
|
|||||||
}
|
}
|
||||||
if (isArrayLike(collection)) {
|
if (isArrayLike(collection)) {
|
||||||
var result = collection.length;
|
var result = collection.length;
|
||||||
return (result && isString(collection))
|
return (result && isString(collection)) ? stringSize(collection) : result;
|
||||||
? stringSize(collection)
|
|
||||||
: result;
|
|
||||||
}
|
}
|
||||||
return keys(collection).length;
|
return keys(collection).length;
|
||||||
}
|
}
|
||||||
@@ -9447,10 +9441,10 @@
|
|||||||
if (!isObjectLike(value) || objToString.call(value) != objectTag || isHostObject(value)) {
|
if (!isObjectLike(value) || objToString.call(value) != objectTag || isHostObject(value)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var proto = typeof value.constructor == 'function'
|
var proto = objectProto;
|
||||||
? getPrototypeOf(value)
|
if (typeof value.constructor == 'function') {
|
||||||
: objectProto;
|
proto = getPrototypeOf(value);
|
||||||
|
}
|
||||||
if (proto === null) {
|
if (proto === null) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user