MCPcopy
hub / github.com/coder/mux / isErrnoWithCode

Function isErrnoWithCode

src/node/utils/fs.ts:29–31  ·  view source on GitHub ↗
(error: unknown, code: string)

Source from the content-addressed store, hash-verified

27 * exact narrow-and-compare pattern and previously each open-coded it.
28 */
29export function isErrnoWithCode(error: unknown, code: string): boolean {
30 return Boolean(error && typeof error === "object" && "code" in error && error.code === code);
31}

Callers 15

getMethod · 0.90
listPendingMethod · 0.90
copyIfExistsFunction · 0.90
copyFileBestEffortFunction · 0.90
concatFilesBestEffortFunction · 0.90
createMultiProjectMethod · 0.90
listWorkspaceTurnsMethod · 0.90
listAllWorkspaceTurnsMethod · 0.90
readWorkspaceTurnFileMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected