MCPcopy
hub / github.com/di-sukharev/opencommit / filterResponse

Function filterResponse

out/cli.cjs:59012–59042  ·  view source on GitHub ↗
(response, type2)

Source from the content-addressed store, hash-verified

59010 },
59011 set(target, p4, value) {
59012 assert2(!(p4 in state2));
59013 target[p4] = value;
59014 return true;
59015 }
59016 });
59017 }
59018 function filterResponse(response, type2) {
59019 if (type2 === "basic") {
59020 return makeFilteredResponse(response, {
59021 type: "basic",
59022 headersList: response.headersList
59023 });
59024 } else if (type2 === "cors") {
59025 return makeFilteredResponse(response, {
59026 type: "cors",
59027 headersList: response.headersList
59028 });
59029 } else if (type2 === "opaque") {
59030 return makeFilteredResponse(response, {
59031 type: "opaque",
59032 urlList: Object.freeze([]),
59033 status: 0,
59034 statusText: "",
59035 body: null
59036 });
59037 } else if (type2 === "opaqueredirect") {
59038 return makeFilteredResponse(response, {
59039 type: "opaqueredirect",
59040 status: 0,
59041 statusText: "",
59042 headersList: [],
59043 body: null
59044 });
59045 } else {

Callers 2

cloneResponseFunction · 0.85
mainFetchFunction · 0.85

Calls 2

makeFilteredResponseFunction · 0.85
freezeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…