Sha256: 8d531a82e2bd8150e5e50b7e2237fcef5163fd4ee63919ec3b1aca73b2420d9e

Contents?: true

Size: 698 Bytes

Versions: 274

Compression:

Stored size: 698 Bytes

Contents

var baseIteratee = require('./_baseIteratee'),
    baseSortedUniq = require('./_baseSortedUniq');

/**
 * This method is like `_.uniqBy` except that it's designed and optimized
 * for sorted arrays.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Array
 * @param {Array} array The array to inspect.
 * @param {Function} [iteratee] The iteratee invoked per element.
 * @returns {Array} Returns the new duplicate free array.
 * @example
 *
 * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
 * // => [1.1, 2.3]
 */
function sortedUniqBy(array, iteratee) {
  return (array && array.length)
    ? baseSortedUniq(array, baseIteratee(iteratee, 2))
    : [];
}

module.exports = sortedUniqBy;

Version data entries

274 entries across 272 versions & 30 rubygems

Version Path
immosquare-cleaner-0.1.60 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.59 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.58 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.57 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.56 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.55 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.54 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.53 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.52 node_modules/lodash/sortedUniqBy.js
trusty-cms-6.3.1 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.51 node_modules/lodash/sortedUniqBy.js
boring_generators-0.15.0 tmp/templates/app_template/node_modules/lodash/sortedUniqBy.js
clapton-0.0.26 lib/clapton/javascripts/node_modules/lodash/sortedUniqBy.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.50 node_modules/lodash/sortedUniqBy.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/lodash/sortedUniqBy.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/lodash/sortedUniqBy.js
clapton-0.0.22 lib/clapton/javascripts/node_modules/lodash/sortedUniqBy.js
clapton-0.0.21 lib/clapton/javascripts/node_modules/lodash/sortedUniqBy.js
clapton-0.0.20 lib/clapton/javascripts/node_modules/lodash/sortedUniqBy.js