MCPcopy Create free account
hub / github.com/material-shell/material-shell / diffLists

Function diffLists

src/utils/diff_list.ts:6–11  ·  view source on GitHub ↗
(lhs: T[], rhs: T[])

Source from the content-addressed store, hash-verified

4 * The result is unspecified if any list contains duplicate items.
5 */
6export function diffLists<T>(lhs: T[], rhs: T[]): { added: T[]; removed: T[] } {
7 return {
8 added: rhs.filter((x) => !lhs.includes(x)),
9 removed: lhs.filter((x) => !rhs.includes(x)),
10 };
11}

Callers 2

onTileableListChangedMethod · 0.90
onTileableListChangeMethod · 0.90

Calls 1

filterMethod · 0.80

Tested by

no test coverage detected