1 var eq = require('./eq');
4 * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
5 * support for iteratee shorthands.
8 * @param {Array} array The array to inspect.
9 * @param {Function} [iteratee] The iteratee invoked per element.
10 * @returns {Array} Returns the new duplicate free array.
12 function baseSortedUniq(array, iteratee) {
14 length = array.length,
18 while (++index < length) {
19 var value = array[index],
20 computed = iteratee ? iteratee(value) : value;
22 if (!index || !eq(computed, seen)) {
24 result[resIndex++] = value === 0 ? 0 : value;
30 module.exports = baseSortedUniq;