MCPcopy Create free account
hub / github.com/nodejs/node / makeFilteredResponse

Function makeFilteredResponse

deps/undici/src/lib/web/fetch/response.js:407–423  ·  view source on GitHub ↗
(response, state)

Source from the content-addressed store, hash-verified

405}
406
407function makeFilteredResponse (response, state) {
408 state = {
409 internalResponse: response,
410 ...state
411 }
412
413 return new Proxy(response, {
414 get (target, p) {
415 return p in state ? state[p] : target[p]
416 },
417 set (target, p, value) {
418 assert(!(p in state))
419 target[p] = value
420 return true
421 }
422 })
423}
424
425// https://fetch.spec.whatwg.org/#concept-filtered-response
426function filterResponse (response, type) {

Callers 1

filterResponseFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected