Skip to content

Commit

Permalink
refactor: add arrEquals util
Browse files Browse the repository at this point in the history
  • Loading branch information
owenpearson committed Oct 5, 2023
1 parent a298240 commit 65ff5d7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/common/lib/util/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -604,3 +604,12 @@ export function toBase64(str: string) {
}
return stringifyBase64(parseUtf8(str));
}

export function arrEquals(a: any[], b: any[]) {
return (
a.length === b.length &&
arrEvery(a, function (val, i) {
return val === b[i];
})
);
}

0 comments on commit 65ff5d7

Please sign in to comment.