MCPcopy Index your code
hub / github.com/anomalyco/opencode / code

Function code

packages/core/src/util/flock.ts:69–74  ·  view source on GitHub ↗
(err: unknown)

Source from the content-addressed store, hash-verified

67 }
68
69 function code(err: unknown) {
70 if (typeof err !== "object" || err === null || !("code" in err)) return
71 const value = err.code
72 if (typeof value !== "string") return
73 return value
74 }
75
76 function sleep(ms: number, signal?: AbortSignal) {
77 return new Promise<void>((resolve, reject) => {

Callers 5

statsFunction · 0.70
tryAcquireLockDirFunction · 0.70
releaseFunction · 0.70
WriteFunction · 0.50
RunEntryContentFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected