MCPcopy
hub / github.com/nock/nock / requestMatchesFilter

Method requestMatchesFilter

lib/interceptor.js:248–255  ·  view source on GitHub ↗
({ name, value: predicate })

Source from the content-addressed store, hash-verified

246 }
247
248 const requestMatchesFilter = ({ name, value: predicate }) => {
249 const headerValue = request.headers.get(name)
250 if (typeof predicate === 'function') {
251 return predicate(headerValue)
252 } else {
253 return common.matchStringOrRegexp(headerValue, predicate)
254 }
255 }
256
257 for (const header of [
258 ...this.scope.matchHeaders,

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected