6d9b5ba17582d7eb8659e9768a5adf128c2b69a5
[yaffs-website] / node_modules / grunt-legacy-log-utils / node_modules / lodash / sortedUniq.js
1 var baseSortedUniq = require('./_baseSortedUniq');
2
3 /**
4  * This method is like `_.uniq` except that it's designed and optimized
5  * for sorted arrays.
6  *
7  * @static
8  * @memberOf _
9  * @category Array
10  * @param {Array} array The array to inspect.
11  * @returns {Array} Returns the new duplicate free array.
12  * @example
13  *
14  * _.sortedUniq([1, 1, 2]);
15  * // => [1, 2]
16  */
17 function sortedUniq(array) {
18   return (array && array.length)
19     ? baseSortedUniq(array)
20     : [];
21 }
22
23 module.exports = sortedUniq;