mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Remove semicolons.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import Stack from './Stack.js';
|
||||
import baseIsEqual from './baseIsEqual.js';
|
||||
import Stack from './Stack.js'
|
||||
import baseIsEqual from './baseIsEqual.js'
|
||||
|
||||
/** Used to compose bitmasks for value comparisons. */
|
||||
const COMPARE_PARTIAL_FLAG = 1;
|
||||
const COMPARE_UNORDERED_FLAG = 2;
|
||||
const COMPARE_PARTIAL_FLAG = 1
|
||||
const COMPARE_UNORDERED_FLAG = 2
|
||||
|
||||
/**
|
||||
* The base implementation of `isMatch`.
|
||||
@@ -16,49 +16,49 @@ const COMPARE_UNORDERED_FLAG = 2;
|
||||
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
|
||||
*/
|
||||
function baseIsMatch(object, source, matchData, customizer) {
|
||||
let index = matchData.length;
|
||||
const length = index;
|
||||
const noCustomizer = !customizer;
|
||||
let index = matchData.length
|
||||
const length = index
|
||||
const noCustomizer = !customizer
|
||||
|
||||
if (object == null) {
|
||||
return !length;
|
||||
return !length
|
||||
}
|
||||
let data;
|
||||
let result;
|
||||
object = Object(object);
|
||||
let data
|
||||
let result
|
||||
object = Object(object)
|
||||
while (index--) {
|
||||
data = matchData[index];
|
||||
data = matchData[index]
|
||||
if ((noCustomizer && data[2])
|
||||
? data[1] !== object[data[0]]
|
||||
: !(data[0] in object)
|
||||
) {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
}
|
||||
while (++index < length) {
|
||||
data = matchData[index];
|
||||
const key = data[0];
|
||||
const objValue = object[key];
|
||||
const srcValue = data[1];
|
||||
data = matchData[index]
|
||||
const key = data[0]
|
||||
const objValue = object[key]
|
||||
const srcValue = data[1]
|
||||
|
||||
if (noCustomizer && data[2]) {
|
||||
if (objValue === undefined && !(key in object)) {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
} else {
|
||||
const stack = new Stack;
|
||||
const stack = new Stack
|
||||
if (customizer) {
|
||||
result = customizer(objValue, srcValue, key, object, source, stack);
|
||||
result = customizer(objValue, srcValue, key, object, source, stack)
|
||||
}
|
||||
if (!(result === undefined
|
||||
? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
|
||||
: result
|
||||
)) {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return true
|
||||
}
|
||||
|
||||
export default baseIsMatch;
|
||||
export default baseIsMatch
|
||||
|
||||
Reference in New Issue
Block a user