MCPcopy Create free account
hub / github.com/chimurai/http-proxy-middleware / isSocketLike

Function isSocketLike

src/plugins/default/error-response-plugin.ts:13–15  ·  view source on GitHub ↗
(obj: any)

Source from the content-addressed store, hash-verified

11}
12
13function isSocketLike(obj: any): obj is Socket {
14 return obj && typeof obj.write === 'function' && !('writeHead' in obj);
15}
16
17export const errorResponsePlugin: Plugin = definePlugin((proxyServer, options) => {
18 proxyServer.on('error', (err, req, res, target?) => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected