aboutsummaryrefslogtreecommitdiff
path: root/src/internal/merge.ts
blob: 88204e29cea39894950cc2bb92e2fb050531d840 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/**
 * Merges and sorts the given arrays.
 *
 * @template T The type of the elements in the arrays.
 *
 * @internal
 *
 * @param args The arrays to merge.
 */
export function mergeArrays<T>(...args: T[][]): T[] {
  return Array.from(new Set(args.flat())).sort();
}