mirror of
https://github.com/nicotsx/zerobyte.git
synced 2026-02-02 01:21:20 -05:00
9 lines
241 B
TypeScript
9 lines
241 B
TypeScript
export const isNodeJSErrnoException = (error: unknown): error is NodeJS.ErrnoException => {
|
|
return (
|
|
typeof error === "object" &&
|
|
error !== null &&
|
|
"code" in error &&
|
|
typeof (error as NodeJS.ErrnoException).code === "string"
|
|
);
|
|
};
|