MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / matchKey

Function matchKey

out/cli.cjs:57226–57232  ·  view source on GitHub ↗
(mockDispatch2, { path: path5, method, body, headers })

Source from the content-addressed store, hash-verified

57224 const pathSegments = path5.split("?");
57225 if (pathSegments.length !== 2) {
57226 return path5;
57227 }
57228 const qp = new URLSearchParams(pathSegments.pop());
57229 qp.sort();
57230 return [...pathSegments, qp.toString()].join("?");
57231 }
57232 function matchKey(mockDispatch2, { path: path5, method, body, headers }) {
57233 const pathMatch = matchValue(mockDispatch2.path, path5);
57234 const methodMatch = matchValue(mockDispatch2.method, method);
57235 const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true;

Callers 1

deleteMockDispatchFunction · 0.85

Calls 2

matchValueFunction · 0.85
matchHeadersFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…