Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js
File: underscore.js
var args = Array(length);
[1000] Fix | Delete
for (var i = 0; i < length; i++) {
[1001] Fix | Delete
args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
[1002] Fix | Delete
}
[1003] Fix | Delete
while (position < arguments.length) args.push(arguments[position++]);
[1004] Fix | Delete
return executeBound(func, bound, this, this, args);
[1005] Fix | Delete
};
[1006] Fix | Delete
return bound;
[1007] Fix | Delete
});
[1008] Fix | Delete
[1009] Fix | Delete
partial.placeholder = _$1;
[1010] Fix | Delete
[1011] Fix | Delete
// Create a function bound to a given object (assigning `this`, and arguments,
[1012] Fix | Delete
// optionally).
[1013] Fix | Delete
var bind = restArguments(function(func, context, args) {
[1014] Fix | Delete
if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function');
[1015] Fix | Delete
var bound = restArguments(function(callArgs) {
[1016] Fix | Delete
return executeBound(func, bound, context, this, args.concat(callArgs));
[1017] Fix | Delete
});
[1018] Fix | Delete
return bound;
[1019] Fix | Delete
});
[1020] Fix | Delete
[1021] Fix | Delete
// Internal helper for collection methods to determine whether a collection
[1022] Fix | Delete
// should be iterated as an array or as an object.
[1023] Fix | Delete
// Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
[1024] Fix | Delete
// Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
[1025] Fix | Delete
var isArrayLike = createSizePropertyCheck(getLength);
[1026] Fix | Delete
[1027] Fix | Delete
// Internal implementation of a recursive `flatten` function.
[1028] Fix | Delete
function flatten$1(input, depth, strict, output) {
[1029] Fix | Delete
output = output || [];
[1030] Fix | Delete
if (!depth && depth !== 0) {
[1031] Fix | Delete
depth = Infinity;
[1032] Fix | Delete
} else if (depth <= 0) {
[1033] Fix | Delete
return output.concat(input);
[1034] Fix | Delete
}
[1035] Fix | Delete
var idx = output.length;
[1036] Fix | Delete
for (var i = 0, length = getLength(input); i < length; i++) {
[1037] Fix | Delete
var value = input[i];
[1038] Fix | Delete
if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) {
[1039] Fix | Delete
// Flatten current level of array or arguments object.
[1040] Fix | Delete
if (depth > 1) {
[1041] Fix | Delete
flatten$1(value, depth - 1, strict, output);
[1042] Fix | Delete
idx = output.length;
[1043] Fix | Delete
} else {
[1044] Fix | Delete
var j = 0, len = value.length;
[1045] Fix | Delete
while (j < len) output[idx++] = value[j++];
[1046] Fix | Delete
}
[1047] Fix | Delete
} else if (!strict) {
[1048] Fix | Delete
output[idx++] = value;
[1049] Fix | Delete
}
[1050] Fix | Delete
}
[1051] Fix | Delete
return output;
[1052] Fix | Delete
}
[1053] Fix | Delete
[1054] Fix | Delete
// Bind a number of an object's methods to that object. Remaining arguments
[1055] Fix | Delete
// are the method names to be bound. Useful for ensuring that all callbacks
[1056] Fix | Delete
// defined on an object belong to it.
[1057] Fix | Delete
var bindAll = restArguments(function(obj, keys) {
[1058] Fix | Delete
keys = flatten$1(keys, false, false);
[1059] Fix | Delete
var index = keys.length;
[1060] Fix | Delete
if (index < 1) throw new Error('bindAll must be passed function names');
[1061] Fix | Delete
while (index--) {
[1062] Fix | Delete
var key = keys[index];
[1063] Fix | Delete
obj[key] = bind(obj[key], obj);
[1064] Fix | Delete
}
[1065] Fix | Delete
return obj;
[1066] Fix | Delete
});
[1067] Fix | Delete
[1068] Fix | Delete
// Memoize an expensive function by storing its results.
[1069] Fix | Delete
function memoize(func, hasher) {
[1070] Fix | Delete
var memoize = function(key) {
[1071] Fix | Delete
var cache = memoize.cache;
[1072] Fix | Delete
var address = '' + (hasher ? hasher.apply(this, arguments) : key);
[1073] Fix | Delete
if (!has$1(cache, address)) cache[address] = func.apply(this, arguments);
[1074] Fix | Delete
return cache[address];
[1075] Fix | Delete
};
[1076] Fix | Delete
memoize.cache = {};
[1077] Fix | Delete
return memoize;
[1078] Fix | Delete
}
[1079] Fix | Delete
[1080] Fix | Delete
// Delays a function for the given number of milliseconds, and then calls
[1081] Fix | Delete
// it with the arguments supplied.
[1082] Fix | Delete
var delay = restArguments(function(func, wait, args) {
[1083] Fix | Delete
return setTimeout(function() {
[1084] Fix | Delete
return func.apply(null, args);
[1085] Fix | Delete
}, wait);
[1086] Fix | Delete
});
[1087] Fix | Delete
[1088] Fix | Delete
// Defers a function, scheduling it to run after the current call stack has
[1089] Fix | Delete
// cleared.
[1090] Fix | Delete
var defer = partial(delay, _$1, 1);
[1091] Fix | Delete
[1092] Fix | Delete
// Returns a function, that, when invoked, will only be triggered at most once
[1093] Fix | Delete
// during a given window of time. Normally, the throttled function will run
[1094] Fix | Delete
// as much as it can, without ever going more than once per `wait` duration;
[1095] Fix | Delete
// but if you'd like to disable the execution on the leading edge, pass
[1096] Fix | Delete
// `{leading: false}`. To disable execution on the trailing edge, ditto.
[1097] Fix | Delete
function throttle(func, wait, options) {
[1098] Fix | Delete
var timeout, context, args, result;
[1099] Fix | Delete
var previous = 0;
[1100] Fix | Delete
if (!options) options = {};
[1101] Fix | Delete
[1102] Fix | Delete
var later = function() {
[1103] Fix | Delete
previous = options.leading === false ? 0 : now();
[1104] Fix | Delete
timeout = null;
[1105] Fix | Delete
result = func.apply(context, args);
[1106] Fix | Delete
if (!timeout) context = args = null;
[1107] Fix | Delete
};
[1108] Fix | Delete
[1109] Fix | Delete
var throttled = function() {
[1110] Fix | Delete
var _now = now();
[1111] Fix | Delete
if (!previous && options.leading === false) previous = _now;
[1112] Fix | Delete
var remaining = wait - (_now - previous);
[1113] Fix | Delete
context = this;
[1114] Fix | Delete
args = arguments;
[1115] Fix | Delete
if (remaining <= 0 || remaining > wait) {
[1116] Fix | Delete
if (timeout) {
[1117] Fix | Delete
clearTimeout(timeout);
[1118] Fix | Delete
timeout = null;
[1119] Fix | Delete
}
[1120] Fix | Delete
previous = _now;
[1121] Fix | Delete
result = func.apply(context, args);
[1122] Fix | Delete
if (!timeout) context = args = null;
[1123] Fix | Delete
} else if (!timeout && options.trailing !== false) {
[1124] Fix | Delete
timeout = setTimeout(later, remaining);
[1125] Fix | Delete
}
[1126] Fix | Delete
return result;
[1127] Fix | Delete
};
[1128] Fix | Delete
[1129] Fix | Delete
throttled.cancel = function() {
[1130] Fix | Delete
clearTimeout(timeout);
[1131] Fix | Delete
previous = 0;
[1132] Fix | Delete
timeout = context = args = null;
[1133] Fix | Delete
};
[1134] Fix | Delete
[1135] Fix | Delete
return throttled;
[1136] Fix | Delete
}
[1137] Fix | Delete
[1138] Fix | Delete
// When a sequence of calls of the returned function ends, the argument
[1139] Fix | Delete
// function is triggered. The end of a sequence is defined by the `wait`
[1140] Fix | Delete
// parameter. If `immediate` is passed, the argument function will be
[1141] Fix | Delete
// triggered at the beginning of the sequence instead of at the end.
[1142] Fix | Delete
function debounce(func, wait, immediate) {
[1143] Fix | Delete
var timeout, previous, args, result, context;
[1144] Fix | Delete
[1145] Fix | Delete
var later = function() {
[1146] Fix | Delete
var passed = now() - previous;
[1147] Fix | Delete
if (wait > passed) {
[1148] Fix | Delete
timeout = setTimeout(later, wait - passed);
[1149] Fix | Delete
} else {
[1150] Fix | Delete
timeout = null;
[1151] Fix | Delete
if (!immediate) result = func.apply(context, args);
[1152] Fix | Delete
// This check is needed because `func` can recursively invoke `debounced`.
[1153] Fix | Delete
if (!timeout) args = context = null;
[1154] Fix | Delete
}
[1155] Fix | Delete
};
[1156] Fix | Delete
[1157] Fix | Delete
var debounced = restArguments(function(_args) {
[1158] Fix | Delete
context = this;
[1159] Fix | Delete
args = _args;
[1160] Fix | Delete
previous = now();
[1161] Fix | Delete
if (!timeout) {
[1162] Fix | Delete
timeout = setTimeout(later, wait);
[1163] Fix | Delete
if (immediate) result = func.apply(context, args);
[1164] Fix | Delete
}
[1165] Fix | Delete
return result;
[1166] Fix | Delete
});
[1167] Fix | Delete
[1168] Fix | Delete
debounced.cancel = function() {
[1169] Fix | Delete
clearTimeout(timeout);
[1170] Fix | Delete
timeout = args = context = null;
[1171] Fix | Delete
};
[1172] Fix | Delete
[1173] Fix | Delete
return debounced;
[1174] Fix | Delete
}
[1175] Fix | Delete
[1176] Fix | Delete
// Returns the first function passed as an argument to the second,
[1177] Fix | Delete
// allowing you to adjust arguments, run code before and after, and
[1178] Fix | Delete
// conditionally execute the original function.
[1179] Fix | Delete
function wrap(func, wrapper) {
[1180] Fix | Delete
return partial(wrapper, func);
[1181] Fix | Delete
}
[1182] Fix | Delete
[1183] Fix | Delete
// Returns a negated version of the passed-in predicate.
[1184] Fix | Delete
function negate(predicate) {
[1185] Fix | Delete
return function() {
[1186] Fix | Delete
return !predicate.apply(this, arguments);
[1187] Fix | Delete
};
[1188] Fix | Delete
}
[1189] Fix | Delete
[1190] Fix | Delete
// Returns a function that is the composition of a list of functions, each
[1191] Fix | Delete
// consuming the return value of the function that follows.
[1192] Fix | Delete
function compose() {
[1193] Fix | Delete
var args = arguments;
[1194] Fix | Delete
var start = args.length - 1;
[1195] Fix | Delete
return function() {
[1196] Fix | Delete
var i = start;
[1197] Fix | Delete
var result = args[start].apply(this, arguments);
[1198] Fix | Delete
while (i--) result = args[i].call(this, result);
[1199] Fix | Delete
return result;
[1200] Fix | Delete
};
[1201] Fix | Delete
}
[1202] Fix | Delete
[1203] Fix | Delete
// Returns a function that will only be executed on and after the Nth call.
[1204] Fix | Delete
function after(times, func) {
[1205] Fix | Delete
return function() {
[1206] Fix | Delete
if (--times < 1) {
[1207] Fix | Delete
return func.apply(this, arguments);
[1208] Fix | Delete
}
[1209] Fix | Delete
};
[1210] Fix | Delete
}
[1211] Fix | Delete
[1212] Fix | Delete
// Returns a function that will only be executed up to (but not including) the
[1213] Fix | Delete
// Nth call.
[1214] Fix | Delete
function before(times, func) {
[1215] Fix | Delete
var memo;
[1216] Fix | Delete
return function() {
[1217] Fix | Delete
if (--times > 0) {
[1218] Fix | Delete
memo = func.apply(this, arguments);
[1219] Fix | Delete
}
[1220] Fix | Delete
if (times <= 1) func = null;
[1221] Fix | Delete
return memo;
[1222] Fix | Delete
};
[1223] Fix | Delete
}
[1224] Fix | Delete
[1225] Fix | Delete
// Returns a function that will be executed at most one time, no matter how
[1226] Fix | Delete
// often you call it. Useful for lazy initialization.
[1227] Fix | Delete
var once = partial(before, 2);
[1228] Fix | Delete
[1229] Fix | Delete
// Returns the first key on an object that passes a truth test.
[1230] Fix | Delete
function findKey(obj, predicate, context) {
[1231] Fix | Delete
predicate = cb(predicate, context);
[1232] Fix | Delete
var _keys = keys(obj), key;
[1233] Fix | Delete
for (var i = 0, length = _keys.length; i < length; i++) {
[1234] Fix | Delete
key = _keys[i];
[1235] Fix | Delete
if (predicate(obj[key], key, obj)) return key;
[1236] Fix | Delete
}
[1237] Fix | Delete
}
[1238] Fix | Delete
[1239] Fix | Delete
// Internal function to generate `_.findIndex` and `_.findLastIndex`.
[1240] Fix | Delete
function createPredicateIndexFinder(dir) {
[1241] Fix | Delete
return function(array, predicate, context) {
[1242] Fix | Delete
predicate = cb(predicate, context);
[1243] Fix | Delete
var length = getLength(array);
[1244] Fix | Delete
var index = dir > 0 ? 0 : length - 1;
[1245] Fix | Delete
for (; index >= 0 && index < length; index += dir) {
[1246] Fix | Delete
if (predicate(array[index], index, array)) return index;
[1247] Fix | Delete
}
[1248] Fix | Delete
return -1;
[1249] Fix | Delete
};
[1250] Fix | Delete
}
[1251] Fix | Delete
[1252] Fix | Delete
// Returns the first index on an array-like that passes a truth test.
[1253] Fix | Delete
var findIndex = createPredicateIndexFinder(1);
[1254] Fix | Delete
[1255] Fix | Delete
// Returns the last index on an array-like that passes a truth test.
[1256] Fix | Delete
var findLastIndex = createPredicateIndexFinder(-1);
[1257] Fix | Delete
[1258] Fix | Delete
// Use a comparator function to figure out the smallest index at which
[1259] Fix | Delete
// an object should be inserted so as to maintain order. Uses binary search.
[1260] Fix | Delete
function sortedIndex(array, obj, iteratee, context) {
[1261] Fix | Delete
iteratee = cb(iteratee, context, 1);
[1262] Fix | Delete
var value = iteratee(obj);
[1263] Fix | Delete
var low = 0, high = getLength(array);
[1264] Fix | Delete
while (low < high) {
[1265] Fix | Delete
var mid = Math.floor((low + high) / 2);
[1266] Fix | Delete
if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
[1267] Fix | Delete
}
[1268] Fix | Delete
return low;
[1269] Fix | Delete
}
[1270] Fix | Delete
[1271] Fix | Delete
// Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.
[1272] Fix | Delete
function createIndexFinder(dir, predicateFind, sortedIndex) {
[1273] Fix | Delete
return function(array, item, idx) {
[1274] Fix | Delete
var i = 0, length = getLength(array);
[1275] Fix | Delete
if (typeof idx == 'number') {
[1276] Fix | Delete
if (dir > 0) {
[1277] Fix | Delete
i = idx >= 0 ? idx : Math.max(idx + length, i);
[1278] Fix | Delete
} else {
[1279] Fix | Delete
length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
[1280] Fix | Delete
}
[1281] Fix | Delete
} else if (sortedIndex && idx && length) {
[1282] Fix | Delete
idx = sortedIndex(array, item);
[1283] Fix | Delete
return array[idx] === item ? idx : -1;
[1284] Fix | Delete
}
[1285] Fix | Delete
if (item !== item) {
[1286] Fix | Delete
idx = predicateFind(slice.call(array, i, length), isNaN$1);
[1287] Fix | Delete
return idx >= 0 ? idx + i : -1;
[1288] Fix | Delete
}
[1289] Fix | Delete
for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
[1290] Fix | Delete
if (array[idx] === item) return idx;
[1291] Fix | Delete
}
[1292] Fix | Delete
return -1;
[1293] Fix | Delete
};
[1294] Fix | Delete
}
[1295] Fix | Delete
[1296] Fix | Delete
// Return the position of the first occurrence of an item in an array,
[1297] Fix | Delete
// or -1 if the item is not included in the array.
[1298] Fix | Delete
// If the array is large and already in sort order, pass `true`
[1299] Fix | Delete
// for **isSorted** to use binary search.
[1300] Fix | Delete
var indexOf = createIndexFinder(1, findIndex, sortedIndex);
[1301] Fix | Delete
[1302] Fix | Delete
// Return the position of the last occurrence of an item in an array,
[1303] Fix | Delete
// or -1 if the item is not included in the array.
[1304] Fix | Delete
var lastIndexOf = createIndexFinder(-1, findLastIndex);
[1305] Fix | Delete
[1306] Fix | Delete
// Return the first value which passes a truth test.
[1307] Fix | Delete
function find(obj, predicate, context) {
[1308] Fix | Delete
var keyFinder = isArrayLike(obj) ? findIndex : findKey;
[1309] Fix | Delete
var key = keyFinder(obj, predicate, context);
[1310] Fix | Delete
if (key !== void 0 && key !== -1) return obj[key];
[1311] Fix | Delete
}
[1312] Fix | Delete
[1313] Fix | Delete
// Convenience version of a common use case of `_.find`: getting the first
[1314] Fix | Delete
// object containing specific `key:value` pairs.
[1315] Fix | Delete
function findWhere(obj, attrs) {
[1316] Fix | Delete
return find(obj, matcher(attrs));
[1317] Fix | Delete
}
[1318] Fix | Delete
[1319] Fix | Delete
// The cornerstone for collection functions, an `each`
[1320] Fix | Delete
// implementation, aka `forEach`.
[1321] Fix | Delete
// Handles raw objects in addition to array-likes. Treats all
[1322] Fix | Delete
// sparse array-likes as if they were dense.
[1323] Fix | Delete
function each(obj, iteratee, context) {
[1324] Fix | Delete
iteratee = optimizeCb(iteratee, context);
[1325] Fix | Delete
var i, length;
[1326] Fix | Delete
if (isArrayLike(obj)) {
[1327] Fix | Delete
for (i = 0, length = obj.length; i < length; i++) {
[1328] Fix | Delete
iteratee(obj[i], i, obj);
[1329] Fix | Delete
}
[1330] Fix | Delete
} else {
[1331] Fix | Delete
var _keys = keys(obj);
[1332] Fix | Delete
for (i = 0, length = _keys.length; i < length; i++) {
[1333] Fix | Delete
iteratee(obj[_keys[i]], _keys[i], obj);
[1334] Fix | Delete
}
[1335] Fix | Delete
}
[1336] Fix | Delete
return obj;
[1337] Fix | Delete
}
[1338] Fix | Delete
[1339] Fix | Delete
// Return the results of applying the iteratee to each element.
[1340] Fix | Delete
function map(obj, iteratee, context) {
[1341] Fix | Delete
iteratee = cb(iteratee, context);
[1342] Fix | Delete
var _keys = !isArrayLike(obj) && keys(obj),
[1343] Fix | Delete
length = (_keys || obj).length,
[1344] Fix | Delete
results = Array(length);
[1345] Fix | Delete
for (var index = 0; index < length; index++) {
[1346] Fix | Delete
var currentKey = _keys ? _keys[index] : index;
[1347] Fix | Delete
results[index] = iteratee(obj[currentKey], currentKey, obj);
[1348] Fix | Delete
}
[1349] Fix | Delete
return results;
[1350] Fix | Delete
}
[1351] Fix | Delete
[1352] Fix | Delete
// Internal helper to create a reducing function, iterating left or right.
[1353] Fix | Delete
function createReduce(dir) {
[1354] Fix | Delete
// Wrap code that reassigns argument variables in a separate function than
[1355] Fix | Delete
// the one that accesses `arguments.length` to avoid a perf hit. (#1991)
[1356] Fix | Delete
var reducer = function(obj, iteratee, memo, initial) {
[1357] Fix | Delete
var _keys = !isArrayLike(obj) && keys(obj),
[1358] Fix | Delete
length = (_keys || obj).length,
[1359] Fix | Delete
index = dir > 0 ? 0 : length - 1;
[1360] Fix | Delete
if (!initial) {
[1361] Fix | Delete
memo = obj[_keys ? _keys[index] : index];
[1362] Fix | Delete
index += dir;
[1363] Fix | Delete
}
[1364] Fix | Delete
for (; index >= 0 && index < length; index += dir) {
[1365] Fix | Delete
var currentKey = _keys ? _keys[index] : index;
[1366] Fix | Delete
memo = iteratee(memo, obj[currentKey], currentKey, obj);
[1367] Fix | Delete
}
[1368] Fix | Delete
return memo;
[1369] Fix | Delete
};
[1370] Fix | Delete
[1371] Fix | Delete
return function(obj, iteratee, memo, context) {
[1372] Fix | Delete
var initial = arguments.length >= 3;
[1373] Fix | Delete
return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
[1374] Fix | Delete
};
[1375] Fix | Delete
}
[1376] Fix | Delete
[1377] Fix | Delete
// **Reduce** builds up a single result from a list of values, aka `inject`,
[1378] Fix | Delete
// or `foldl`.
[1379] Fix | Delete
var reduce = createReduce(1);
[1380] Fix | Delete
[1381] Fix | Delete
// The right-associative version of reduce, also known as `foldr`.
[1382] Fix | Delete
var reduceRight = createReduce(-1);
[1383] Fix | Delete
[1384] Fix | Delete
// Return all the elements that pass a truth test.
[1385] Fix | Delete
function filter(obj, predicate, context) {
[1386] Fix | Delete
var results = [];
[1387] Fix | Delete
predicate = cb(predicate, context);
[1388] Fix | Delete
each(obj, function(value, index, list) {
[1389] Fix | Delete
if (predicate(value, index, list)) results.push(value);
[1390] Fix | Delete
});
[1391] Fix | Delete
return results;
[1392] Fix | Delete
}
[1393] Fix | Delete
[1394] Fix | Delete
// Return all the elements for which a truth test fails.
[1395] Fix | Delete
function reject(obj, predicate, context) {
[1396] Fix | Delete
return filter(obj, negate(cb(predicate)), context);
[1397] Fix | Delete
}
[1398] Fix | Delete
[1399] Fix | Delete
// Determine whether all of the elements pass a truth test.
[1400] Fix | Delete
function every(obj, predicate, context) {
[1401] Fix | Delete
predicate = cb(predicate, context);
[1402] Fix | Delete
var _keys = !isArrayLike(obj) && keys(obj),
[1403] Fix | Delete
length = (_keys || obj).length;
[1404] Fix | Delete
for (var index = 0; index < length; index++) {
[1405] Fix | Delete
var currentKey = _keys ? _keys[index] : index;
[1406] Fix | Delete
if (!predicate(obj[currentKey], currentKey, obj)) return false;
[1407] Fix | Delete
}
[1408] Fix | Delete
return true;
[1409] Fix | Delete
}
[1410] Fix | Delete
[1411] Fix | Delete
// Determine if at least one element in the object passes a truth test.
[1412] Fix | Delete
function some(obj, predicate, context) {
[1413] Fix | Delete
predicate = cb(predicate, context);
[1414] Fix | Delete
var _keys = !isArrayLike(obj) && keys(obj),
[1415] Fix | Delete
length = (_keys || obj).length;
[1416] Fix | Delete
for (var index = 0; index < length; index++) {
[1417] Fix | Delete
var currentKey = _keys ? _keys[index] : index;
[1418] Fix | Delete
if (predicate(obj[currentKey], currentKey, obj)) return true;
[1419] Fix | Delete
}
[1420] Fix | Delete
return false;
[1421] Fix | Delete
}
[1422] Fix | Delete
[1423] Fix | Delete
// Determine if the array or object contains a given item (using `===`).
[1424] Fix | Delete
function contains(obj, item, fromIndex, guard) {
[1425] Fix | Delete
if (!isArrayLike(obj)) obj = values(obj);
[1426] Fix | Delete
if (typeof fromIndex != 'number' || guard) fromIndex = 0;
[1427] Fix | Delete
return indexOf(obj, item, fromIndex) >= 0;
[1428] Fix | Delete
}
[1429] Fix | Delete
[1430] Fix | Delete
// Invoke a method (with arguments) on every item in a collection.
[1431] Fix | Delete
var invoke = restArguments(function(obj, path, args) {
[1432] Fix | Delete
var contextPath, func;
[1433] Fix | Delete
if (isFunction$1(path)) {
[1434] Fix | Delete
func = path;
[1435] Fix | Delete
} else {
[1436] Fix | Delete
path = toPath(path);
[1437] Fix | Delete
contextPath = path.slice(0, -1);
[1438] Fix | Delete
path = path[path.length - 1];
[1439] Fix | Delete
}
[1440] Fix | Delete
return map(obj, function(context) {
[1441] Fix | Delete
var method = func;
[1442] Fix | Delete
if (!method) {
[1443] Fix | Delete
if (contextPath && contextPath.length) {
[1444] Fix | Delete
context = deepGet(context, contextPath);
[1445] Fix | Delete
}
[1446] Fix | Delete
if (context == null) return void 0;
[1447] Fix | Delete
method = context[path];
[1448] Fix | Delete
}
[1449] Fix | Delete
return method == null ? method : method.apply(context, args);
[1450] Fix | Delete
});
[1451] Fix | Delete
});
[1452] Fix | Delete
[1453] Fix | Delete
// Convenience version of a common use case of `_.map`: fetching a property.
[1454] Fix | Delete
function pluck(obj, key) {
[1455] Fix | Delete
return map(obj, property(key));
[1456] Fix | Delete
}
[1457] Fix | Delete
[1458] Fix | Delete
// Convenience version of a common use case of `_.filter`: selecting only
[1459] Fix | Delete
// objects containing specific `key:value` pairs.
[1460] Fix | Delete
function where(obj, attrs) {
[1461] Fix | Delete
return filter(obj, matcher(attrs));
[1462] Fix | Delete
}
[1463] Fix | Delete
[1464] Fix | Delete
// Return the maximum element (or element-based computation).
[1465] Fix | Delete
function max(obj, iteratee, context) {
[1466] Fix | Delete
var result = -Infinity, lastComputed = -Infinity,
[1467] Fix | Delete
value, computed;
[1468] Fix | Delete
if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {
[1469] Fix | Delete
obj = isArrayLike(obj) ? obj : values(obj);
[1470] Fix | Delete
for (var i = 0, length = obj.length; i < length; i++) {
[1471] Fix | Delete
value = obj[i];
[1472] Fix | Delete
if (value != null && value > result) {
[1473] Fix | Delete
result = value;
[1474] Fix | Delete
}
[1475] Fix | Delete
}
[1476] Fix | Delete
} else {
[1477] Fix | Delete
iteratee = cb(iteratee, context);
[1478] Fix | Delete
each(obj, function(v, index, list) {
[1479] Fix | Delete
computed = iteratee(v, index, list);
[1480] Fix | Delete
if (computed > lastComputed || (computed === -Infinity && result === -Infinity)) {
[1481] Fix | Delete
result = v;
[1482] Fix | Delete
lastComputed = computed;
[1483] Fix | Delete
}
[1484] Fix | Delete
});
[1485] Fix | Delete
}
[1486] Fix | Delete
return result;
[1487] Fix | Delete
}
[1488] Fix | Delete
[1489] Fix | Delete
// Return the minimum element (or element-based computation).
[1490] Fix | Delete
function min(obj, iteratee, context) {
[1491] Fix | Delete
var result = Infinity, lastComputed = Infinity,
[1492] Fix | Delete
value, computed;
[1493] Fix | Delete
if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {
[1494] Fix | Delete
obj = isArrayLike(obj) ? obj : values(obj);
[1495] Fix | Delete
for (var i = 0, length = obj.length; i < length; i++) {
[1496] Fix | Delete
value = obj[i];
[1497] Fix | Delete
if (value != null && value < result) {
[1498] Fix | Delete
result = value;
[1499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function