MCPcopy
hub / github.com/epicweb-dev/epic-stack / combineResponseInits

Function combineResponseInits

app/utils/misc.tsx:124–135  ·  view source on GitHub ↗
(
	...responseInits: Array<ResponseInit | null | undefined>
)

Source from the content-addressed store, hash-verified

122 * Combine multiple response init objects into one (uses combineHeaders)
123 */
124export function combineResponseInits(
125 ...responseInits: Array<ResponseInit | null | undefined>
126) {
127 let combined: ResponseInit = {}
128 for (const responseInit of responseInits) {
129 combined = {
130 ...responseInit,
131 headers: combineHeaders(combined.headers, responseInit?.headers),
132 }
133 }
134 return combined
135}
136
137/**
138 * Returns true if the current navigation is submitting the current route's

Callers 1

handleNewSessionFunction · 0.90

Calls 1

combineHeadersFunction · 0.85

Tested by

no test coverage detected