MCPcopy Create free account
hub / github.com/Noumena-Network/code / unwrapDefault

Function unwrapDefault

src/tools/FileReadTool/imageProcessor.ts:103–107  ·  view source on GitHub ↗
(
  mod: MaybeDefault<T>,
)

Source from the content-addressed store, hash-verified

101type MaybeDefault<T> = T | { default: T }
102
103function unwrapDefault<T extends (...args: never[]) => unknown>(
104 mod: MaybeDefault<T>,
105): T {
106 return typeof mod === 'function' ? mod : mod.default
107}

Callers 2

getImageProcessorFunction · 0.85
getImageCreatorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected