MCPcopy Create free account
hub / github.com/denoland/std / mapError

Function mapError

fs/_map_error.ts:26–29  ·  view source on GitHub ↗
(e: E)

Source from the content-addressed store, hash-verified

24}
25
26export function mapError<E>(e: E) {
27 if (!isNodeErr(e)) return e;
28 return map[e.code]?.(e) || e;
29}

Callers 15

readDirFunction · 0.90
readDirSyncFunction · 0.90
mkdirFunction · 0.90
mkdirSyncFunction · 0.90
openFunction · 0.90
openSyncFunction · 0.90
writeTextFileFunction · 0.90
writeTextFileSyncFunction · 0.90
truncateFunction · 0.90
truncateSyncFunction · 0.90
symlinkFunction · 0.90
symlinkSyncFunction · 0.90

Calls 1

isNodeErrFunction · 0.85

Tested by

no test coverage detected