(error: unknown, code: string)
| 64 | const LOCK_POLL_MS = 25; |
| 65 | |
| 66 | export function isNodeErrorCode(error: unknown, code: string): boolean { |
| 67 | return ( |
| 68 | typeof error === 'object' && |
| 69 | error !== null && |
| 70 | 'code' in error && |
| 71 | (error as NodeJS.ErrnoException).code === code |
| 72 | ); |
| 73 | } |
| 74 | |
| 75 | export async function pathIsFile(filePath: string): Promise<boolean> { |
| 76 | try { |
no outgoing calls
no test coverage detected