MCPcopy
hub / github.com/benjitaylor/agentation / resolveConfig

Function resolveConfig

package/src/utils/react-detection.ts:207–231  ·  view source on GitHub ↗
(config?: ReactDetectionConfig)

Source from the content-addressed store, hash-verified

205}
206
207function resolveConfig(config?: ReactDetectionConfig): ResolvedConfig {
208 const mode = config?.mode ?? "filtered";
209
210 // Convert skipExact to Set if array
211 let skipExact = DEFAULT_SKIP_EXACT;
212 if (config?.skipExact) {
213 const additional =
214 config.skipExact instanceof Set
215 ? config.skipExact
216 : new Set(config.skipExact);
217 skipExact = new Set([...DEFAULT_SKIP_EXACT, ...additional]);
218 }
219
220 return {
221 maxComponents: config?.maxComponents ?? 6,
222 maxDepth: config?.maxDepth ?? 30,
223 mode,
224 skipExact,
225 skipPatterns: config?.skipPatterns
226 ? [...DEFAULT_SKIP_PATTERNS, ...config.skipPatterns]
227 : DEFAULT_SKIP_PATTERNS,
228 userPatterns: config?.userPatterns ?? DEFAULT_USER_PATTERNS,
229 filter: config?.filter,
230 };
231}
232
233// =============================================================================
234// Filter Logic

Callers 1

getReactComponentNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…