MCPcopy Create free account
hub / github.com/vercel/vercel / findMatchingKeys

Function findMatchingKeys

packages/cli/src/util/dev/transforms.ts:285–293  ·  view source on GitHub ↗
(data: TransformData, keyPattern: KeyRule)

Source from the content-addressed store, hash-verified

283}
284
285function findMatchingKeys(data: TransformData, keyPattern: KeyRule): string[] {
286 const matched: string[] = [];
287 for (const key of Object.keys(data)) {
288 if (matchesRule(key, keyPattern)) {
289 matched.push(key);
290 }
291 }
292 return matched;
293}
294
295function matchesRule(candidate: string, rule: KeyRule): boolean {
296 candidate = candidate.toLowerCase();

Callers 1

applyTransformFunction · 0.85

Calls 3

matchesRuleFunction · 0.85
pushMethod · 0.65
keysMethod · 0.45

Tested by

no test coverage detected