MCPcopy Create free account
hub / github.com/oboard/claude-code-rev / unwrapDefaultExport

Function unwrapDefaultExport

src/utils/computerUse/inputLoader.ts:8–17  ·  view source on GitHub ↗
(mod: T | { default: T })

Source from the content-addressed store, hash-verified

6let cached: ComputerUseInputAPI | undefined
7
8function unwrapDefaultExport<T>(mod: T | { default: T }): T {
9 return (
10 typeof mod === 'object' &&
11 mod !== null &&
12 'default' in mod &&
13 mod.default !== undefined
14 ? mod.default
15 : mod
16 ) as T
17}
18
19/**
20 * Package's js/index.js reads COMPUTER_USE_INPUT_NODE_PATH (baked by

Callers 1

requireComputerUseInputFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected