MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getImageCreator

Function getImageCreator

src/tools/FileReadTool/imageProcessor.ts:74–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72 * so this always uses sharp directly.
73 */
74export async function getImageCreator(): Promise<SharpCreator> {
75 if (imageCreatorModule) {
76 return imageCreatorModule.default
77 }
78
79 const imported = (await import(
80 'sharp'
81 )) as unknown as MaybeDefault<SharpCreator>
82 const sharp = unwrapDefault(imported)
83 imageCreatorModule = { default: sharp }
84 return sharp
85}
86
87// Dynamic import shape varies by module interop mode — ESM yields { default: fn }, CJS yields fn directly.
88type MaybeDefault<T> = T | { default: T }

Callers

nothing calls this directly

Calls 1

unwrapDefaultFunction · 0.85

Tested by

no test coverage detected