Lines Matching refs:array

491   function arrayAggregator(array, setter, iteratee, accumulator) {  argument
493 length = array == null ? 0 : array.length;
496 var value = array[index];
497 setter(accumulator, value, iteratee(value), array);
511 function arrayEach(array, iteratee) { argument
513 length = array == null ? 0 : array.length;
516 if (iteratee(array[index], index, array) === false) {
520 return array;
532 function arrayEachRight(array, iteratee) { argument
533 var length = array == null ? 0 : array.length;
536 if (iteratee(array[length], length, array) === false) {
540 return array;
553 function arrayEvery(array, predicate) { argument
555 length = array == null ? 0 : array.length;
558 if (!predicate(array[index], index, array)) {
574 function arrayFilter(array, predicate) { argument
576 length = array == null ? 0 : array.length,
581 var value = array[index];
582 if (predicate(value, index, array)) {
598 function arrayIncludes(array, value) { argument
599 var length = array == null ? 0 : array.length;
600 return !!length && baseIndexOf(array, value, 0) > -1;
612 function arrayIncludesWith(array, value, comparator) { argument
614 length = array == null ? 0 : array.length;
617 if (comparator(value, array[index])) {
633 function arrayMap(array, iteratee) { argument
635 length = array == null ? 0 : array.length,
639 result[index] = iteratee(array[index], index, array);
652 function arrayPush(array, values) { argument
655 offset = array.length;
658 array[offset + index] = values[index];
660 return array;
675 function arrayReduce(array, iteratee, accumulator, initAccum) { argument
677 length = array == null ? 0 : array.length;
680 accumulator = array[++index];
683 accumulator = iteratee(accumulator, array[index], index, array);
700 function arrayReduceRight(array, iteratee, accumulator, initAccum) { argument
701 var length = array == null ? 0 : array.length;
703 accumulator = array[--length];
706 accumulator = iteratee(accumulator, array[length], length, array);
721 function arraySome(array, predicate) { argument
723 length = array == null ? 0 : array.length;
726 if (predicate(array[index], index, array)) {
797 function baseFindIndex(array, predicate, fromIndex, fromRight) { argument
798 var length = array.length,
802 if (predicate(array[index], index, array)) {
818 function baseIndexOf(array, value, fromIndex) { argument
820 ? strictIndexOf(array, value, fromIndex)
821 : baseFindIndex(array, baseIsNaN, fromIndex);
834 function baseIndexOfWith(array, value, fromIndex, comparator) { argument
836 length = array.length;
839 if (comparator(array[index], value)) {
866 function baseMean(array, iteratee) { argument
867 var length = array == null ? 0 : array.length;
868 return length ? (baseSum(array, iteratee) / length) : NAN;
929 function baseSortBy(array, comparer) { argument
930 var length = array.length;
932 array.sort(comparer);
934 array[length] = array[length].value;
936 return array;
948 function baseSum(array, iteratee) { argument
951 length = array.length;
954 var current = iteratee(array[index]);
1078 function countHolders(array, placeholder) { argument
1079 var length = array.length,
1083 if (array[length] === placeholder) {
1211 function replaceHolders(array, placeholder) { argument
1213 length = array.length,
1218 var value = array[index];
1220 array[index] = PLACEHOLDER;
1271 function strictIndexOf(array, value, fromIndex) { argument
1273 length = array.length;
1276 if (array[index] === value) {
1293 function strictLastIndexOf(array, value, fromIndex) { argument
1296 if (array[index] === value) {
1843 var array = this.__wrapped__.value(),
1845 isArr = isArray(array),
1847 arrLength = isArr ? array.length : 0,
1859 return baseWrapperValue(array, this.__actions__);
1868 value = array[index];
2417 function arraySample(array) { argument
2418 var length = array.length;
2419 return length ? array[baseRandom(0, length - 1)] : undefined;
2430 function arraySampleSize(array, n) { argument
2431 return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
2441 function arrayShuffle(array) { argument
2442 return shuffleSelf(copyArray(array));
2487 function assocIndexOf(array, key) { argument
2488 var length = array.length;
2490 if (eq(array[length][0], key)) {
2764 function baseDifference(array, values, iteratee, comparator) { argument
2768 length = array.length,
2789 var value = array[index],
2857 function baseExtremum(array, iteratee, comparator) { argument
2859 length = array.length;
2862 var value = array[index],
2886 function baseFill(array, value, start, end) { argument
2887 var length = array.length;
2899 array[start++] = value;
2901 return array;
2933 function baseFlatten(array, depth, predicate, isStrict, result) { argument
2935 length = array.length;
2941 var value = array[index];
3142 var array = arrays[othIndex];
3144 array = arrayMap(array, baseUnary(iteratee));
3146 maxLength = nativeMin(array.length, maxLength);
3147 caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
3148 ? new SetCache(othIndex && array)
3151 array = arrays[0];
3158 var value = array[index],
3703 function baseNth(array, n) { argument
3704 var length = array.length;
3709 return isIndex(n, length) ? array[n] : undefined;
3801 function basePullAll(array, values, iteratee, comparator) { argument
3805 seen = array;
3807 if (array === values) {
3811 seen = arrayMap(array, baseUnary(iteratee));
3819 if (seen !== array) {
3822 splice.call(array, fromIndex, 1);
3825 return array;
3837 function basePullAt(array, indexes) { argument
3838 var length = array ? indexes.length : 0,
3846 splice.call(array, index, 1);
3848 baseUnset(array, index);
3852 return array;
3951 var array = values(collection);
3952 return shuffleSelf(array, baseClamp(n, 0, array.length));
4045 function baseSlice(array, start, end) { argument
4047 length = array.length;
4061 result[index] = array[index + start];
4097 function baseSortedIndex(array, value, retHighest) { argument
4099 high = array == null ? low : array.length;
4104 computed = array[mid];
4115 return baseSortedIndexBy(array, value, identity, retHighest);
4131 function baseSortedIndexBy(array, value, iteratee, retHighest) { argument
4135 high = array == null ? 0 : array.length,
4143 computed = iteratee(array[mid]),
4180 function baseSortedUniq(array, iteratee) { argument
4182 length = array.length,
4187 var value = array[index],
4249 function baseUniq(array, iteratee, comparator) { argument
4252 length = array.length,
4262 var set = iteratee ? null : createSet(array);
4275 var value = array[index],
4340 function baseWhile(array, predicate, isDrop, fromRight) { argument
4341 var length = array.length,
4345 predicate(array[index], index, array)) {}
4348 ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
4349 : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
4391 var array = arrays[index],
4396 … result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
4482 function castSlice(array, start, end) { argument
4483 var length = array.length;
4485 return (!start && end >= length) ? array : baseSlice(array, start, end);
4739 function copyArray(source, array) { argument
4743 array || (array = Array(length));
4745 array[index] = source[index];
4747 return array;
5613 function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { argument
5615 arrLength = array.length,
5622 var stacked = stack.get(array);
5630 stack.set(array, other);
5631 stack.set(other, array);
5635 var arrValue = array[index],
5640 ? customizer(othValue, arrValue, index, other, array, stack)
5641 : customizer(arrValue, othValue, index, array, other, stack);
5669 stack['delete'](array);
5887 array = realNames[result],
5888 length = hasOwnProperty.call(realNames, result) ? array.length : 0;
5891 var data = array[length],
6148 function initCloneArray(array) { argument
6149 var length = array.length,
6150 result = new array.constructor(length);
6153 if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
6154 result.index = array.index;
6155 result.input = array.input;
6552 array = Array(length);
6555 array[index] = args[start + index];
6562 otherArgs[start] = transform(array);
6589 function reorder(array, indexes) {
6590 var arrLength = array.length,
6592 oldArray = copyArray(array);
6596 array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
6598 return array;
6711 function shuffleSelf(array, size) {
6713 length = array.length,
6719 value = array[rand];
6721 array[rand] = array[index];
6722 array[index] = value;
6724 array.length = size;
6725 return array;
6839 function chunk(array, size, guard) {
6840 if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
6845 var length = array == null ? 0 : array.length;
6854 result[resIndex++] = baseSlice(array, index, (index += size));
6874 function compact(array) {
6876 length = array == null ? 0 : array.length,
6881 var value = array[index];
6917 array = arguments[0],
6923 return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
6947 var difference = baseRest(function(array, values) {
6948 return isArrayLikeObject(array)
6949 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
6979 var differenceBy = baseRest(function(array, values) {
6984 return isArrayLikeObject(array)
6985 … ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
7012 var differenceWith = baseRest(function(array, values) {
7017 return isArrayLikeObject(array)
7018 … ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
7047 function drop(array, n, guard) {
7048 var length = array == null ? 0 : array.length;
7053 return baseSlice(array, n < 0 ? 0 : n, length);
7081 function dropRight(array, n, guard) {
7082 var length = array == null ? 0 : array.length;
7088 return baseSlice(array, 0, n < 0 ? 0 : n);
7126 function dropRightWhile(array, predicate) {
7127 return (array && array.length)
7128 ? baseWhile(array, getIteratee(predicate, 3), true, true)
7167 function dropWhile(array, predicate) {
7168 return (array && array.length)
7169 ? baseWhile(array, getIteratee(predicate, 3), true)
7202 function fill(array, value, start, end) {
7203 var length = array == null ? 0 : array.length;
7207 if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
7211 return baseFill(array, value, start, end);
7249 function findIndex(array, predicate, fromIndex) {
7250 var length = array == null ? 0 : array.length;
7258 return baseFindIndex(array, getIteratee(predicate, 3), index);
7296 function findLastIndex(array, predicate, fromIndex) {
7297 var length = array == null ? 0 : array.length;
7308 return baseFindIndex(array, getIteratee(predicate, 3), index, true);
7325 function flatten(array) {
7326 var length = array == null ? 0 : array.length;
7327 return length ? baseFlatten(array, 1) : [];
7344 function flattenDeep(array) {
7345 var length = array == null ? 0 : array.length;
7346 return length ? baseFlatten(array, INFINITY) : [];
7369 function flattenDepth(array, depth) {
7370 var length = array == null ? 0 : array.length;
7375 return baseFlatten(array, depth);
7423 function head(array) {
7424 return (array && array.length) ? array[0] : undefined;
7450 function indexOf(array, value, fromIndex) {
7451 var length = array == null ? 0 : array.length;
7459 return baseIndexOf(array, value, index);
7476 function initial(array) {
7477 var length = array == null ? 0 : array.length;
7478 return length ? baseSlice(array, 0, -1) : [];
7591 function join(array, separator) {
7592 return array == null ? '' : nativeJoin.call(array, separator);
7609 function last(array) {
7610 var length = array == null ? 0 : array.length;
7611 return length ? array[length - 1] : undefined;
7635 function lastIndexOf(array, value, fromIndex) {
7636 var length = array == null ? 0 : array.length;
7646 ? strictLastIndexOf(array, value, index)
7647 : baseFindIndex(array, baseIsNaN, index, true);
7671 function nth(array, n) {
7672 return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
7720 function pullAll(array, values) {
7721 return (array && array.length && values && values.length)
7722 ? basePullAll(array, values)
7723 : array;
7749 function pullAllBy(array, values, iteratee) {
7750 return (array && array.length && values && values.length)
7751 ? basePullAll(array, values, getIteratee(iteratee, 2))
7752 : array;
7778 function pullAllWith(array, values, comparator) {
7779 return (array && array.length && values && values.length)
7780 ? basePullAll(array, values, undefined, comparator)
7781 : array;
7808 var pullAt = flatRest(function(array, indexes) {
7809 var length = array == null ? 0 : array.length,
7810 result = baseAt(array, indexes);
7812 basePullAt(array, arrayMap(indexes, function(index) {
7847 function remove(array, predicate) {
7849 if (!(array && array.length)) {
7854 length = array.length;
7858 var value = array[index];
7859 if (predicate(value, index, array)) {
7864 basePullAt(array, indexes);
7891 function reverse(array) {
7892 return array == null ? array : nativeReverse.call(array);
7911 function slice(array, start, end) {
7912 var length = array == null ? 0 : array.length;
7916 if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
7924 return baseSlice(array, start, end);
7944 function sortedIndex(array, value) {
7945 return baseSortedIndex(array, value);
7973 function sortedIndexBy(array, value, iteratee) {
7974 return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
7993 function sortedIndexOf(array, value) {
7994 var length = array == null ? 0 : array.length;
7996 var index = baseSortedIndex(array, value);
7997 if (index < length && eq(array[index], value)) {
8022 function sortedLastIndex(array, value) {
8023 return baseSortedIndex(array, value, true);
8051 function sortedLastIndexBy(array, value, iteratee) {
8052 return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
8071 function sortedLastIndexOf(array, value) {
8072 var length = array == null ? 0 : array.length;
8074 var index = baseSortedIndex(array, value, true) - 1;
8075 if (eq(array[index], value)) {
8097 function sortedUniq(array) {
8098 return (array && array.length)
8099 ? baseSortedUniq(array)
8119 function sortedUniqBy(array, iteratee) {
8120 return (array && array.length)
8121 ? baseSortedUniq(array, getIteratee(iteratee, 2))
8139 function tail(array) {
8140 var length = array == null ? 0 : array.length;
8141 return length ? baseSlice(array, 1, length) : [];
8169 function take(array, n, guard) {
8170 if (!(array && array.length)) {
8174 return baseSlice(array, 0, n < 0 ? 0 : n);
8202 function takeRight(array, n, guard) {
8203 var length = array == null ? 0 : array.length;
8209 return baseSlice(array, n < 0 ? 0 : n, length);
8247 function takeRightWhile(array, predicate) {
8248 return (array && array.length)
8249 ? baseWhile(array, getIteratee(predicate, 3), false, true)
8288 function takeWhile(array, predicate) {
8289 return (array && array.length)
8290 ? baseWhile(array, getIteratee(predicate, 3))
8390 function uniq(array) {
8391 return (array && array.length) ? baseUniq(array) : [];
8417 function uniqBy(array, iteratee) {
8418 return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
8441 function uniqWith(array, comparator) {
8443 return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
8465 function unzip(array) {
8466 if (!(array && array.length)) {
8470 array = arrayFilter(array, function(group) {
8477 return arrayMap(array, baseProperty(index));
8502 function unzipWith(array, iteratee) {
8503 if (!(array && array.length)) {
8506 var result = unzip(array);
8535 var without = baseRest(function(array, values) {
8536 return isArrayLikeObject(array)
8537 ? baseDifference(array, values)
8830 return new LodashWrapper(value, this.__chain__).thru(function(array) {
8831 if (length && !array.length) {
8832 array.push(undefined);
8834 return array;
10843 var array = args[start],
10846 if (array) {
10847 arrayPush(otherArgs, array);
16279 function max(array) {
16280 return (array && array.length)
16281 ? baseExtremum(array, identity, baseGt)
16308 function maxBy(array, iteratee) {
16309 return (array && array.length)
16310 ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
16328 function mean(array) {
16329 return baseMean(array, identity);
16355 function meanBy(array, iteratee) {
16356 return baseMean(array, getIteratee(iteratee, 2));
16377 function min(array) {
16378 return (array && array.length)
16379 ? baseExtremum(array, identity, baseLt)
16406 function minBy(array, iteratee) {
16407 return (array && array.length)
16408 ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
16487 function sum(array) {
16488 return (array && array.length)
16489 ? baseSum(array, identity)
16516 function sumBy(array, iteratee) {
16517 return (array && array.length)
16518 ? baseSum(array, getIteratee(iteratee, 2))