push
This commit is contained in:
12
lib/component/shuttleFrame/util.ts
Normal file
12
lib/component/shuttleFrame/util.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export function compareArrays(arr1: { id: any; type: any; componentRef: any }[], arr2: any[]) {
|
||||
const val: any[] = [];
|
||||
arr1.map((item: { id: any; type: any; componentRef: any }) => {
|
||||
const ret = arr2.find((ev) => {
|
||||
return ev.id === item.id && ev.type == item.type && ev.componentRef == item.componentRef;
|
||||
});
|
||||
if (ret == undefined) {
|
||||
val.push(item);
|
||||
}
|
||||
});
|
||||
return val;
|
||||
}
|
||||
Reference in New Issue
Block a user