MCPcopy
hub / github.com/lingodotdev/lingo.dev / segmentMatches

Function segmentMatches

packages/cli/src/cli/utils/buckets.ts:333–336  ·  view source on GitHub ↗
(patternSegment: string, sourceSegment: string)

Source from the content-addressed store, hash-verified

331 const parent = new Map<string, { i2: number; j2: number }>();
332 const isDoubleStar = (segment: string) => segment === "**";
333 const segmentMatches = (patternSegment: string, sourceSegment: string) => {
334 const concrete = patternSegment.replaceAll("[locale]", locale);
335 return minimatch(sourceSegment, concrete, { dot: true, nocase: true });
336 };
337 const forbid = options?.forbid;
338 const key = (i: number, j: number) => `${i}|${j}`;
339 const dfs = (i: number, j: number): boolean => {

Callers 1

dfsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected