MCPcopy Create free account
hub / github.com/Effect-TS/effect / removeHost

Function removeHost

packages/effect/src/unstable/http/HttpServerRequest.ts:461–467  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

459}
460
461const removeHost = (url: string) => {
462 if (url[0] === "/") {
463 return url
464 }
465 const index = url.indexOf("/", url.indexOf("//") + 2)
466 return index === -1 ? "/" : url.slice(index)
467}
468
469class ServerRequestImpl extends Inspectable.Class implements HttpServerRequest {
470 readonly [TypeId]: typeof TypeId

Callers 2

fromWebFunction · 0.70
urlMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected