mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-01 23:02:26 +00:00
7 lines
223 B
TypeScript
7 lines
223 B
TypeScript
export function same<T>(a: readonly T[] | undefined, b: readonly T[] | undefined) {
|
|
if (a === b) return true
|
|
if (!a || !b) return false
|
|
if (a.length !== b.length) return false
|
|
return a.every((x, i) => x === b[i])
|
|
}
|