MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / matchScore

Function matchScore

packages/react/src/routes/plugins.$pluginId.$.tsx:56–57  ·  view source on GitHub ↗
(pattern: string)

Source from the content-addressed store, hash-verified

54};
55
56const matchScore = (pattern: string): number =>
57 pathSegments(pattern).reduce((score, segment) => score + (segment.startsWith("$") ? 1 : 2), 0);
58
59export const matchPluginPage = <TPage extends { readonly path: string }>(
60 pages: readonly TPage[] | undefined,

Callers 1

matchPluginPageFunction · 0.85

Calls 1

pathSegmentsFunction · 0.85

Tested by

no test coverage detected