Sha256: 5539997ee146f43ebd1cbdf3016040dc2970bb9335eafae7be550cfb1e0b2341

Contents?: true

Size: 657 Bytes

Versions: 174

Compression:

Stored size: 657 Bytes

Contents

/**
 * Gets the index at which the first occurrence of `NaN` is found in `array`.
 *
 * @private
 * @param {Array} array The array to search.
 * @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 `NaN`, else `-1`.
 */
function indexOfNaN(array, fromIndex, fromRight) {
  var length = array.length,
      index = fromIndex + (fromRight ? 0 : -1);

  while ((fromRight ? index-- : ++index < length)) {
    var other = array[index];
    if (other !== other) {
      return index;
    }
  }
  return -1;
}

module.exports = indexOfNaN;

Version data entries

174 entries across 80 versions & 8 rubygems

Version Path
trusty-festivity-extension-2.3.30 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/indexOfNaN.js
trusty-festivity-extension-2.3.30 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/indexOfNaN.js
trusty-festivity-extension-2.3.29 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/indexOfNaN.js
trusty-festivity-extension-2.3.29 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/indexOfNaN.js
trusty-festivity-extension-2.3.28 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/indexOfNaN.js
trusty-festivity-extension-2.3.28 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/indexOfNaN.js
trusty-festivity-extension-2.3.27 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/indexOfNaN.js
trusty-festivity-extension-2.3.27 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/indexOfNaN.js
trusty-festivity-extension-2.3.26 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/indexOfNaN.js
trusty-festivity-extension-2.3.26 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/indexOfNaN.js
trusty-festivity-extension-2.3.25 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/indexOfNaN.js
trusty-festivity-extension-2.3.25 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/indexOfNaN.js
trusty-festivity-extension-2.3.24 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/indexOfNaN.js
trusty-festivity-extension-2.3.24 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/indexOfNaN.js
trusty-festivity-extension-2.3.23 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/indexOfNaN.js
trusty-festivity-extension-2.3.23 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/indexOfNaN.js
es6_tilt-0.1.2 test/dummy/node_modules/lodash/internal/indexOfNaN.js
es6_tilt-0.1.2 test/dummy/app/assets/javascripts/node_modules/lodash/internal/indexOfNaN.js
es6_tilt-0.1.1 test/dummy/node_modules/lodash/internal/indexOfNaN.js
es6_tilt-0.1.1 test/dummy/app/assets/javascripts/node_modules/lodash/internal/indexOfNaN.js