Skip to content

probe-web / @probe-web/client / index / matchSourcePath

Function: matchSourcePath()

ts
function matchSourcePath(path, candidates): string | null;

Defined in: sources.ts:18

The candidate that is the longest /-boundary suffix of path (or equal to it). Candidates are relative paths such as src/main.rs. Returns null if none match.

Parameters

ParameterType
pathstring
candidatesIterable<string>

Returns

string | null