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
clapton-0.0.1 lib/clapton/javascripts/node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.47 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.46 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.45 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.44 node_modules/lodash/sortedUniqBy.js
boring_generators-0.14.0 tmp/templates/app_template/node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.43 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.42 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.41 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.40 node_modules/lodash/sortedUniqBy.js
sumomo-0.10.8 data/sumomo/api_modules/node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.39 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.38 node_modules/lodash/sortedUniqBy.js
optimacms-0.1.61 spec/dummy/node_modules/lodash/sortedUniqBy.js
boring_generators-0.13.0 tmp/templates/app_template/node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.32 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.31 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.30 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.29 node_modules/lodash/sortedUniqBy.js
immosquare-cleaner-0.1.28 node_modules/lodash/sortedUniqBy.js