COLLECTED BY
Organization:
Internet Archive
Focused crawls are collections of frequently-updated webcrawl data from narrow (as opposed to broad or wide) web crawls, often focused on a single domain or subdomain.
The Wayback Machine - https://web.archive.org/web/20201220222637/https://github.com/lodash/lodash/blob/master/uniq.js
Permalink
Cannot retrieve contributors at this time
26 lines (24 sloc)
704 Bytes
import baseUniq from './.internal/baseUniq.js'
/**
* Creates a duplicate-free version of an array, using
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons, in which only the first occurrence of each element
* is kept. The order of result values is determined by the order they occur
* in the array.
*
* @since 0.1.0
* @category Array
* @param {Array } array The array to inspect.
* @returns {Array } Returns the new duplicate free array.
* @see uniqBy, uniqWith
* @example
*
* uniq([2, 1, 2])
* // => [2, 1]
*/
function uniq ( array ) {
return ( array != null && array . length )
? baseUniq ( array )
: [ ]
}
export default uniq
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.