Download packages/app/src/utils/same.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 223 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/app/src/utils/same.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/app/src/utils/same.ts
-
curl -L -o same.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/app/src/utils/same.ts
223 Bytes
| 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]) | |
| } | |