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

Function isExpoModuleSource

src/resolution/frameworks/expo-modules.ts:94–99  ·  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

92 * have `class X: Module` for unrelated reasons).
93 */
94function isExpoModuleSource(source: string): boolean {
95 if (!EXPO_CLASS_RE.test(source)) return false;
96 // Reset lastIndex defensively; EXPO_DECL_RE has the `g` flag.
97 EXPO_DECL_RE.lastIndex = 0;
98 return EXPO_DECL_RE.test(source);
99}
100
101/**
102 * 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