Sha256: 07e9942a47eeb723eb9fa1bc0f7240f93ad9f52d702c0f37d7163670000350c1

Contents?: true

Size: 766 Bytes

Versions: 265

Compression:

Stored size: 766 Bytes

Contents

/**
 * The base implementation of `_.findIndex` and `_.findLastIndex` without
 * support for iteratee shorthands.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {Function} predicate The function invoked per iteration.
 * @param {number} fromIndex The index to search from.
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function baseFindIndex(array, predicate, fromIndex, fromRight) {
  var length = array.length,
      index = fromIndex + (fromRight ? 1 : -1);

  while ((fromRight ? index-- : ++index < length)) {
    if (predicate(array[index], index, array)) {
      return index;
    }
  }
  return -1;
}

module.exports = baseFindIndex;

Version data entries

265 entries across 263 versions & 30 rubygems

Version Path
trusty-cms-6.3.1 node_modules/lodash/_baseFindIndex.js
immosquare-cleaner-0.1.51 node_modules/lodash/_baseFindIndex.js
boring_generators-0.15.0 tmp/templates/app_template/node_modules/lodash/_baseFindIndex.js
clapton-0.0.26 lib/clapton/javascripts/node_modules/lodash/_baseFindIndex.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/lodash/_baseFindIndex.js
immosquare-cleaner-0.1.50 node_modules/lodash/_baseFindIndex.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/lodash/_baseFindIndex.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/lodash/_baseFindIndex.js
clapton-0.0.22 lib/clapton/javascripts/node_modules/lodash/_baseFindIndex.js
clapton-0.0.21 lib/clapton/javascripts/node_modules/lodash/_baseFindIndex.js
clapton-0.0.20 lib/clapton/javascripts/node_modules/lodash/_baseFindIndex.js
clapton-0.0.19 lib/clapton/javascripts/node_modules/lodash/_baseFindIndex.js
clapton-0.0.18 lib/clapton/javascripts/node_modules/lodash/_baseFindIndex.js
clapton-0.0.17 lib/clapton/javascripts/node_modules/lodash/_baseFindIndex.js
clapton-0.0.16 lib/clapton/javascripts/node_modules/lodash/_baseFindIndex.js
clapton-0.0.15 lib/clapton/javascripts/node_modules/lodash/_baseFindIndex.js
immosquare-cleaner-0.1.49 node_modules/lodash/_baseFindIndex.js
clapton-0.0.14 lib/clapton/javascripts/node_modules/lodash/_baseFindIndex.js
immosquare-cleaner-0.1.48 node_modules/lodash/_baseFindIndex.js
clapton-0.0.13 lib/clapton/javascripts/node_modules/lodash/_baseFindIndex.js