CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes45downloads
sortedUniq.js25 linesDownload Raw Back to lodash
1var baseSortedUniq = require('./_baseSortedUniq');2 3/**4 * This method is like `_.uniq` except that it's designed and optimized5 * for sorted arrays.6 *7 * @static8 * @memberOf _9 * @since 4.0.010 * @category Array11 * @param {Array} array The array to inspect.12 * @returns {Array} Returns the new duplicate free array.13 * @example14 *15 * _.sortedUniq([1, 1, 2]);16 * // => [1, 2]17 */18function sortedUniq(array) {19  return (array && array.length)20    ? baseSortedUniq(array)21    : [];22}23 24module.exports = sortedUniq;25 
basant307/AI_Governance_Project · CoolFace