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

Function findObjcClassName

src/resolution/frameworks/react-native.ts:152–155  ·  view source on GitHub ↗

* Find the `@implementation` class name in an ObjC file — used as the * fallback module name when `RCT_EXPORT_MODULE()` has no argument. * (Categories of the form `@implementation Foo (Bar)` are correctly * captured here as `Foo`, but a category file probably isn't where a * fresh `RCT_EXPORT_MO

(source: string)

Source from the content-addressed store, hash-verified

150 * fresh `RCT_EXPORT_MODULE` lives anyway.)
151 */
152function findObjcClassName(source: string): string | null {
153 const m = source.match(/@implementation\s+([A-Za-z_][A-Za-z0-9_]*)/);
154 return m?.[1] ?? null;
155}
156
157/**
158 * Parse a Java/Kotlin source file for `@ReactMethod` annotated methods

Callers 2

buildRNMapsFunction · 0.85
extractFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected