chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:32:57 +08:00
commit cd420f9332
4811 changed files with 884702 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
/**
* Check if an error is an AbortError.
*
* This handles both:
* - Custom abort errors created with `new Error("AbortError")` (sets .message)
* - Native Node.js AbortError from timers/promises (sets .name)
*/
export function isAbortError(error: unknown): boolean {
return error instanceof Error && (error.name === "AbortError" || error.message === "AbortError");
}