This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
StasisWarden-Legacy/node_modules/es-toolkit/dist/compat/array/union.mjs
T

12 lines
356 B
JavaScript

import { flattenDepth } from './flattenDepth.mjs';
import { uniq } from '../../array/uniq.mjs';
import { isArrayLikeObject } from '../predicate/isArrayLikeObject.mjs';
function union(...arrays) {
const validArrays = arrays.filter(isArrayLikeObject);
const flattened = flattenDepth(validArrays, 1);
return uniq(flattened);
}
export { union };