MCPcopy Index your code
hub / github.com/thesysdev/openui / isLibrary

Function isLibrary

packages/openui-cli/src/commands/generate-worker.ts:51–55  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

49}
50
51function isLibrary(value: unknown): value is Library {
52 if (typeof value !== "object" || value === null) return false;
53 const obj = value as Record<string, unknown>;
54 return typeof obj["prompt"] === "function" && typeof obj["toSpec"] === "function";
55}
56
57function findLibrary(mod: Record<string, unknown>, exportName?: string): Library | undefined {
58 if (exportName) {

Callers 1

findLibraryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected