Move the action from Deno to Node.js and Vite+
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// Node reports a missing file as ENOENT and a missing process as ESRCH, where
|
||||
// Deno threw `Deno.errors.NotFound` for both.
|
||||
export function isNotFound(error: unknown): boolean {
|
||||
if (!(error instanceof Error) || !("code" in error)) {
|
||||
return false;
|
||||
}
|
||||
return error.code === "ENOENT" || error.code === "ESRCH";
|
||||
}
|
||||
Reference in New Issue
Block a user