Skip to content

Commit a1271e5

Browse files
committed
refactor: add arrEquals util
1 parent a298240 commit a1271e5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/common/lib/util/utils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,3 +604,7 @@ export function toBase64(str: string) {
604604
}
605605
return stringifyBase64(parseUtf8(str));
606606
}
607+
608+
export function arrEquals(a: any[], b: any[]) {
609+
return a.length === b.length && arrEvery(a, function(val, i) { return val === b[i] })
610+
}

0 commit comments

Comments
 (0)