Sha256: ba3e1b9a9962fa01a81c38a0990f3ac24fa35bdbc7e0ee14fcda3bb0107c3ab9

Contents?: true

Size: 1.04 KB

Versions: 276

Compression:

Stored size: 1.04 KB

Contents

var baseIteratee = require('./_baseIteratee'),
    baseSortedIndexBy = require('./_baseSortedIndexBy');

/**
 * This method is like `_.sortedIndex` except that it accepts `iteratee`
 * which is invoked for `value` and each element of `array` to compute their
 * sort ranking. The iteratee is invoked with one argument: (value).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Array
 * @param {Array} array The sorted array to inspect.
 * @param {*} value The value to evaluate.
 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
 * @returns {number} Returns the index at which `value` should be inserted
 *  into `array`.
 * @example
 *
 * var objects = [{ 'x': 4 }, { 'x': 5 }];
 *
 * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
 * // => 0
 *
 * // The `_.property` iteratee shorthand.
 * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
 * // => 0
 */
function sortedIndexBy(array, value, iteratee) {
  return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2));
}

module.exports = sortedIndexBy;

Version data entries

276 entries across 274 versions & 30 rubygems

Version Path
rapid_stack-0.2.0 templates/frontend/node_modules/lodash/sortedIndexBy.js
rapid_stack-0.1.1 templates/FrontEnd/node_modules/lodash/sortedIndexBy.js
rapid_stack-0.1.0 templates/FrontEnd/node_modules/lodash/sortedIndexBy.js
immosquare-cleaner-0.1.60 node_modules/lodash/sortedIndexBy.js
immosquare-cleaner-0.1.59 node_modules/lodash/sortedIndexBy.js
immosquare-cleaner-0.1.58 node_modules/lodash/sortedIndexBy.js
immosquare-cleaner-0.1.57 node_modules/lodash/sortedIndexBy.js
immosquare-cleaner-0.1.56 node_modules/lodash/sortedIndexBy.js
immosquare-cleaner-0.1.55 node_modules/lodash/sortedIndexBy.js
immosquare-cleaner-0.1.54 node_modules/lodash/sortedIndexBy.js
immosquare-cleaner-0.1.53 node_modules/lodash/sortedIndexBy.js
immosquare-cleaner-0.1.52 node_modules/lodash/sortedIndexBy.js
trusty-cms-6.3.1 node_modules/lodash/sortedIndexBy.js
immosquare-cleaner-0.1.51 node_modules/lodash/sortedIndexBy.js
boring_generators-0.15.0 tmp/templates/app_template/node_modules/lodash/sortedIndexBy.js
clapton-0.0.26 lib/clapton/javascripts/node_modules/lodash/sortedIndexBy.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/lodash/sortedIndexBy.js
immosquare-cleaner-0.1.50 node_modules/lodash/sortedIndexBy.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/lodash/sortedIndexBy.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/lodash/sortedIndexBy.js