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

Function urlMatchesToken

packages/plugins/graphql/src/sdk/plugin.ts:344–347  ·  view source on GitHub ↗
(url: URL, token: string)

Source from the content-addressed store, hash-verified

342/** Match `token` as a separator-bounded run inside a URL hostname or path,
343 * used as a low-confidence detection hint when introspection fails. */
344const urlMatchesToken = (url: URL, token: string): boolean => {
345 const re = new RegExp(`(?:^|[^a-z0-9])${token}(?:$|[^a-z0-9])`, "i");
346 return re.test(url.hostname) || re.test(url.pathname);
347};
348
349/** Derive an integration slug from an endpoint URL. */
350const slugFromEndpoint = (endpoint: string): string => {

Callers 1

plugin.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected