forked from MapComplete/MapComplete
Further development of split-road feature; refactoring of change-handling
This commit is contained in:
parent
dc4cdda3b5
commit
96ecded0b9
37 changed files with 967 additions and 568 deletions
13
Utils.ts
13
Utils.ts
|
@ -136,6 +136,19 @@ export class Utils {
|
|||
return newArr;
|
||||
}
|
||||
|
||||
public static Identical<T>(t1: T[], t2: T[], eq?: (t: T, t0: T) => boolean): boolean{
|
||||
if(t1.length !== t2.length){
|
||||
return false
|
||||
}
|
||||
eq = (a, b) => a === b
|
||||
for (let i = 0; i < t1.length ; i++) {
|
||||
if(!eq(t1[i] ,t2[i])){
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static MergeTags(a: any, b: any) {
|
||||
const t = {};
|
||||
for (const k in a) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue