mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +00:00
Update _.union documentation (#3758)
Clarifying example as per https://github.com/lodash/lodash/issues/3757
This commit is contained in:
4
union.js
4
union.js
@@ -14,8 +14,8 @@ import isArrayLikeObject from './isArrayLikeObject.js'
|
|||||||
* @see difference, unionBy, unionWith, without, xor, xorBy
|
* @see difference, unionBy, unionWith, without, xor, xorBy
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* union([2], [1, 2])
|
* union([2, 3], [1, 2])
|
||||||
* // => [2, 1]
|
* // => [2, 3, 1]
|
||||||
*/
|
*/
|
||||||
function union(...arrays) {
|
function union(...arrays) {
|
||||||
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true))
|
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true))
|
||||||
|
|||||||
Reference in New Issue
Block a user