MCPcopy
hub / github.com/Semantic-Org/Semantic-UI / matchOne

Function matchOne

test/helpers/sinon.js:4061–4068  ·  view source on GitHub ↗
(response, reqMethod, reqUrl)

Source from the content-addressed store, hash-verified

4059 var rCurrLoc = new RegExp("^" + wloc.protocol + "//" + wloc.host);
4060
4061 function matchOne(response, reqMethod, reqUrl) {
4062 var rmeth = response.method;
4063 var matchMethod = !rmeth || rmeth.toLowerCase() == reqMethod.toLowerCase();
4064 var url = response.url;
4065 var matchUrl = !url || url == reqUrl || (typeof url.test == "function" && url.test(reqUrl));
4066
4067 return matchMethod && matchUrl;
4068 }
4069
4070 function match(response, request) {
4071 var requestUrl = request.url;

Callers 1

matchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…