Remove semicolons.

This commit is contained in:
John-David Dalton
2017-02-04 23:50:10 -08:00
parent f3a8e55e70
commit 6cb3460fce
452 changed files with 4261 additions and 4261 deletions

View File

@@ -1,20 +1,20 @@
import composeArgs from './composeArgs.js';
import composeArgsRight from './composeArgsRight.js';
import replaceHolders from './replaceHolders.js';
import composeArgs from './composeArgs.js'
import composeArgsRight from './composeArgsRight.js'
import replaceHolders from './replaceHolders.js'
/** Used as the internal argument placeholder. */
const PLACEHOLDER = '__lodash_placeholder__';
const PLACEHOLDER = '__lodash_placeholder__'
/** Used to compose bitmasks for function metadata. */
const WRAP_BIND_FLAG = 1;
const WRAP_BIND_KEY_FLAG = 2;
const WRAP_CURRY_BOUND_FLAG = 4;
const WRAP_CURRY_FLAG = 8;
const WRAP_ARY_FLAG = 128;
const WRAP_REARG_FLAG = 256;
const WRAP_BIND_FLAG = 1
const WRAP_BIND_KEY_FLAG = 2
const WRAP_CURRY_BOUND_FLAG = 4
const WRAP_CURRY_FLAG = 8
const WRAP_ARY_FLAG = 128
const WRAP_REARG_FLAG = 256
/* Built-in method references for those with the same name as other `lodash` methods. */
const nativeMin = Math.min;
const nativeMin = Math.min
/**
* Merges the function metadata of `source` into `data`.
@@ -33,60 +33,60 @@ const nativeMin = Math.min;
* @returns {Array} Returns `data`.
*/
function mergeData(data, source) {
const bitmask = data[1];
const srcBitmask = source[1];
const bitmask = data[1]
const srcBitmask = source[1]
let newBitmask = bitmask | srcBitmask;
const isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
let newBitmask = bitmask | srcBitmask
const isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG)
const isCombo =
((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG))
// Exit early if metadata can't be merged.
if (!(isCommon || isCombo)) {
return data;
return data
}
// Use source `thisArg` if available.
if (srcBitmask & WRAP_BIND_FLAG) {
data[2] = source[2];
data[2] = source[2]
// Set when currying a bound function.
newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG
}
// Compose partial arguments.
let partials;
let value = source[3];
let partials
let value = source[3]
if (value) {
partials = data[3];
data[3] = partials ? composeArgs(partials, value, source[4]) : value;
data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
partials = data[3]
data[3] = partials ? composeArgs(partials, value, source[4]) : value
data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]
}
// Compose partial right arguments.
value = source[5];
value = source[5]
if (value) {
partials = data[5];
data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
partials = data[5]
data[5] = partials ? composeArgsRight(partials, value, source[6]) : value
data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]
}
// Use source `argPos` if available.
value = source[7];
value = source[7]
if (value) {
data[7] = value;
data[7] = value
}
// Use source `ary` if it's smaller.
if (srcBitmask & WRAP_ARY_FLAG) {
data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8])
}
// Use source `arity` if one is not provided.
if (data[9] == null) {
data[9] = source[9];
data[9] = source[9]
}
// Use source `func` and merge bitmasks.
data[0] = source[0];
data[1] = newBitmask;
data[0] = source[0]
data[1] = newBitmask
return data;
return data
}
export default mergeData;
export default mergeData