Sha256: 12fd6cb97760b1bcb96425c29119ac39c747c6c6b24a4e2398cdc8d859a3e574

Contents?: true

Size: 632 Bytes

Versions: 273

Compression:

Stored size: 632 Bytes

Contents

/**
 * A specialized version of `_.filter` for arrays without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} predicate The function invoked per iteration.
 * @returns {Array} Returns the new filtered array.
 */
function arrayFilter(array, predicate) {
  var index = -1,
      length = array == null ? 0 : array.length,
      resIndex = 0,
      result = [];

  while (++index < length) {
    var value = array[index];
    if (predicate(value, index, array)) {
      result[resIndex++] = value;
    }
  }
  return result;
}

module.exports = arrayFilter;

Version data entries

273 entries across 271 versions & 29 rubygems

Version Path
sumomo-0.7.3 data/sumomo/api_modules/node_modules/lodash/_arrayFilter.js
sumomo-0.7.2 data/sumomo/api_modules/node_modules/lodash/_arrayFilter.js
sumomo-0.7.1 data/sumomo/api_modules/node_modules/lodash/_arrayFilter.js
sumomo-0.6.4 data/sumomo/api_modules/node_modules/lodash/_arrayFilter.js
sumomo-0.6.3 data/sumomo/api_modules/node_modules/lodash/_arrayFilter.js
sumomo-0.6.2 data/sumomo/api_modules/node_modules/lodash/_arrayFilter.js
sumomo-0.6.1 data/sumomo/api_modules/node_modules/lodash/_arrayFilter.js
affiliator-0.2.1 node_modules/lodash/_arrayFilter.js
sumomo-0.6.0 data/sumomo/api_modules/node_modules/lodash/_arrayFilter.js
guard-sass-lint-0.1.2 node_modules/lodash/_arrayFilter.js
guard-sass-lint-0.1.1 node_modules/lodash/_arrayFilter.js
lanes-0.8.0 node_modules/globule/node_modules/lodash/_arrayFilter.js
lanes-0.8.0 node_modules/lodash/_arrayFilter.js