mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Align indentations
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,3 +2,6 @@
|
|||||||
*.log*
|
*.log*
|
||||||
doc/*.html
|
doc/*.html
|
||||||
node_modules
|
node_modules
|
||||||
|
*.code-workspace
|
||||||
|
*.sublime-project
|
||||||
|
*.sublime-workspace
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ function arrayLikeKeys(value, inherited) {
|
|||||||
for (const key in value) {
|
for (const key in value) {
|
||||||
if ((inherited || hasOwnProperty.call(value, key)) &&
|
if ((inherited || hasOwnProperty.call(value, key)) &&
|
||||||
!(skipIndexes && (
|
!(skipIndexes && (
|
||||||
// Safari 9 has enumerable `arguments.length` in strict mode.
|
// Safari 9 has enumerable `arguments.length` in strict mode.
|
||||||
(key == 'length' ||
|
(key == 'length' ||
|
||||||
// Skip index properties.
|
// Skip index properties.
|
||||||
isIndex(key, length))
|
isIndex(key, length))
|
||||||
))) {
|
))) {
|
||||||
|
|||||||
@@ -47,16 +47,16 @@ function baseIntersection(arrays, iteratee, comparator) {
|
|||||||
|
|
||||||
value = (comparator || value !== 0) ? value : 0
|
value = (comparator || value !== 0) ? value : 0
|
||||||
if (!(seen
|
if (!(seen
|
||||||
? cacheHas(seen, computed)
|
? cacheHas(seen, computed)
|
||||||
: includes(result, computed, comparator)
|
: includes(result, computed, comparator)
|
||||||
)) {
|
)) {
|
||||||
othIndex = othLength
|
othIndex = othLength
|
||||||
while (--othIndex) {
|
while (--othIndex) {
|
||||||
const cache = caches[othIndex]
|
const cache = caches[othIndex]
|
||||||
if (!(cache
|
if (!(cache
|
||||||
? cacheHas(cache, computed)
|
? cacheHas(cache, computed)
|
||||||
: includes(arrays[othIndex], computed, comparator))
|
: includes(arrays[othIndex], computed, comparator))
|
||||||
) {
|
) {
|
||||||
continue outer
|
continue outer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ function baseIsMatch(object, source, matchData, customizer) {
|
|||||||
while (index--) {
|
while (index--) {
|
||||||
data = matchData[index]
|
data = matchData[index]
|
||||||
if ((noCustomizer && data[2])
|
if ((noCustomizer && data[2])
|
||||||
? data[1] !== object[data[0]]
|
? data[1] !== object[data[0]]
|
||||||
: !(data[0] in object)
|
: !(data[0] in object)
|
||||||
) {
|
) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -51,9 +51,9 @@ function baseIsMatch(object, source, matchData, customizer) {
|
|||||||
result = customizer(objValue, srcValue, key, object, source, stack)
|
result = customizer(objValue, srcValue, key, object, source, stack)
|
||||||
}
|
}
|
||||||
if (!(result === undefined
|
if (!(result === undefined
|
||||||
? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
|
? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
|
||||||
: result
|
: result
|
||||||
)) {
|
)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,9 +69,9 @@ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
} else if (!(
|
} else if (!(
|
||||||
arrValue === othValue ||
|
arrValue === othValue ||
|
||||||
equalFunc(arrValue, othValue, bitmask, customizer, stack)
|
equalFunc(arrValue, othValue, bitmask, customizer, stack)
|
||||||
)) {
|
)) {
|
||||||
result = false
|
result = false
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,9 +60,9 @@ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|||||||
}
|
}
|
||||||
// Recursively compare objects (susceptible to call stack limits).
|
// Recursively compare objects (susceptible to call stack limits).
|
||||||
if (!(compared === undefined
|
if (!(compared === undefined
|
||||||
? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
|
? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
|
||||||
: compared
|
: compared
|
||||||
)) {
|
)) {
|
||||||
result = false
|
result = false
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ function isIterateeCall(value, index, object) {
|
|||||||
}
|
}
|
||||||
const type = typeof index
|
const type = typeof index
|
||||||
if (type == 'number'
|
if (type == 'number'
|
||||||
? (isArrayLike(object) && isIndex(index, object.length))
|
? (isArrayLike(object) && isIndex(index, object.length))
|
||||||
: (type == 'string' && index in object)
|
: (type == 'string' && index in object)
|
||||||
) {
|
) {
|
||||||
return eq(object[index], value)
|
return eq(object[index], value)
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ const rePropName = RegExp(
|
|||||||
')\\]'+ '|' +
|
')\\]'+ '|' +
|
||||||
// Or match "" as the space between consecutive dots or empty brackets.
|
// Or match "" as the space between consecutive dots or empty brackets.
|
||||||
'(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))'
|
'(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))'
|
||||||
, 'g')
|
, 'g')
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts `string` to a property path array.
|
* Converts `string` to a property path array.
|
||||||
|
|||||||
6
maxBy.js
6
maxBy.js
@@ -27,9 +27,9 @@ function maxBy(array, iteratee) {
|
|||||||
const current = iteratee(value)
|
const current = iteratee(value)
|
||||||
|
|
||||||
if (current != null && (computed === undefined
|
if (current != null && (computed === undefined
|
||||||
? (current === current && !isSymbol(current))
|
? (current === current && !isSymbol(current))
|
||||||
: (current > computed)
|
: (current > computed)
|
||||||
)) {
|
)) {
|
||||||
computed = current
|
computed = current
|
||||||
result = value
|
result = value
|
||||||
}
|
}
|
||||||
|
|||||||
6
minBy.js
6
minBy.js
@@ -27,9 +27,9 @@ function minBy(array, iteratee) {
|
|||||||
const current = iteratee(value)
|
const current = iteratee(value)
|
||||||
|
|
||||||
if (current != null && (computed === undefined
|
if (current != null && (computed === undefined
|
||||||
? (current === current && !isSymbol(current))
|
? (current === current && !isSymbol(current))
|
||||||
: (current < computed)
|
: (current < computed)
|
||||||
)) {
|
)) {
|
||||||
computed = current
|
computed = current
|
||||||
result = value
|
result = value
|
||||||
}
|
}
|
||||||
|
|||||||
4
split.js
4
split.js
@@ -29,9 +29,9 @@ function split(string, separator, limit) {
|
|||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
if (string && (
|
if (string && (
|
||||||
typeof separator == 'string' ||
|
typeof separator == 'string' ||
|
||||||
(separator != null && !isRegExp(separator))
|
(separator != null && !isRegExp(separator))
|
||||||
)) {
|
)) {
|
||||||
if (!separator && hasUnicode(string)) {
|
if (!separator && hasUnicode(string)) {
|
||||||
return castSlice(stringToArray(string), 0, limit)
|
return castSlice(stringToArray(string), 0, limit)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user