mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
# add dist
This commit is contained in:
32
ng2-components/ng2-alfresco-documentslist/dist/node_modules/lodash/uniqBy.js
generated
vendored
Normal file
32
ng2-components/ng2-alfresco-documentslist/dist/node_modules/lodash/uniqBy.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
var baseIteratee = require('./_baseIteratee'),
|
||||
baseUniq = require('./_baseUniq');
|
||||
|
||||
/**
|
||||
* This method is like `_.uniq` except that it accepts `iteratee` which is
|
||||
* invoked for each element in `array` to generate the criterion by which
|
||||
* uniqueness is computed. The iteratee is invoked with one argument: (value).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Array
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {Array|Function|Object|string} [iteratee=_.identity]
|
||||
* The iteratee invoked per element.
|
||||
* @returns {Array} Returns the new duplicate free array.
|
||||
* @example
|
||||
*
|
||||
* _.uniqBy([2.1, 1.2, 2.3], Math.floor);
|
||||
* // => [2.1, 1.2]
|
||||
*
|
||||
* // The `_.property` iteratee shorthand.
|
||||
* _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
|
||||
* // => [{ 'x': 1 }, { 'x': 2 }]
|
||||
*/
|
||||
function uniqBy(array, iteratee) {
|
||||
return (array && array.length)
|
||||
? baseUniq(array, baseIteratee(iteratee))
|
||||
: [];
|
||||
}
|
||||
|
||||
module.exports = uniqBy;
|
Reference in New Issue
Block a user