Sha256: dc0299e125d6d39bfbb51ee214eb0ae567489e00228298d72cb52eb9ecbfb808

Contents?: true

Size: 656 Bytes

Versions: 153

Compression:

Stored size: 656 Bytes

Contents

var baseCallback = require('./baseCallback'),
    binaryIndex = require('./binaryIndex'),
    binaryIndexBy = require('./binaryIndexBy');

/**
 * Creates a `_.sortedIndex` or `_.sortedLastIndex` function.
 *
 * @private
 * @param {boolean} [retHighest] Specify returning the highest qualified index.
 * @returns {Function} Returns the new index function.
 */
function createSortedIndex(retHighest) {
  return function(array, value, iteratee, thisArg) {
    return iteratee == null
      ? binaryIndex(array, value, retHighest)
      : binaryIndexBy(array, value, baseCallback(iteratee, thisArg, 1), retHighest);
  };
}

module.exports = createSortedIndex;

Version data entries

153 entries across 80 versions & 8 rubygems

Version Path
ilog-0.4.1 node_modules/contents/node_modules/lodash/internal/createSortedIndex.js
ilog-0.4.1 node_modules/babel-plugin-proto-to-assign/node_modules/lodash/internal/createSortedIndex.js
ilog-0.4.1 node_modules/babel/node_modules/lodash/internal/createSortedIndex.js
ilog-0.4.0 node_modules/babel/node_modules/lodash/internal/createSortedIndex.js
ilog-0.4.0 node_modules/contents/node_modules/lodash/internal/createSortedIndex.js
ilog-0.4.0 node_modules/babel-plugin-proto-to-assign/node_modules/lodash/internal/createSortedIndex.js
ilog-0.3.3 node_modules/babel/node_modules/lodash/internal/createSortedIndex.js
ilog-0.3.3 node_modules/contents/node_modules/lodash/internal/createSortedIndex.js
ilog-0.3.3 node_modules/babel-plugin-proto-to-assign/node_modules/lodash/internal/createSortedIndex.js
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createSortedIndex.js
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/createSortedIndex.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createSortedIndex.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/createSortedIndex.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createSortedIndex.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/createSortedIndex.js
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/lodash/internal/createSortedIndex.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createSortedIndex.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/createSortedIndex.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/createSortedIndex.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/createSortedIndex.js