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

Function unwrapDefaultExport

src/utils/computerUse/swiftLoader.ts:5–14  ·  view source on GitHub ↗
(mod: T | { default: T })

Source from the content-addressed store, hash-verified

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

Callers 1

requireComputerUseSwiftFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected