MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / isExpoModuleSource

Function isExpoModuleSource

src/resolution/frameworks/expo-modules.ts:95–100  ·  view source on GitHub ↗

* Detect whether a file is plausibly an Expo Module — looking for both * the `: Module` inheritance and at least one declarative `Function(...)` * / `AsyncFunction(...)` / `Property(...)` / `Name(...)` literal. Any one * of those alone produces too many false positives (random Swift code can * h

(source: string)

Source from the content-addressed store, hash-verified

93 * have `class X: Module` for unrelated reasons).
94 */
95function isExpoModuleSource(source: string): boolean {
96 if (!EXPO_CLASS_RE.test(source)) return false;
97 // Reset lastIndex defensively; EXPO_DECL_RE has the `g` flag.
98 EXPO_DECL_RE.lastIndex = 0;
99 return EXPO_DECL_RE.test(source);
100}
101
102/**
103 * Extract Expo Module method declarations from a Swift / Kotlin source

Callers 2

extractExpoMethodsFunction · 0.85
detectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected