MCPcopy Index your code
hub / github.com/nodejs/node / host

Method host

lib/internal/url.js:1051–1062  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1049 }
1050
1051 get host() {
1052 let startsAt = this.#context.host_start;
1053 if (this.#context.href[startsAt] === '@') {
1054 startsAt++;
1055 }
1056 // If we have an empty host, then the space between components.host_end and
1057 // components.pathname_start may be occupied by /.
1058 if (startsAt === this.#context.host_end) {
1059 return '';
1060 }
1061 return StringPrototypeSlice(this.#context.href, startsAt, this.#context.pathname_start);
1062 }
1063
1064 set host(value) {
1065 const href = bindingUrl.update(this.#context.href, updateActions.kHost, `${value}`);

Callers

nothing calls this directly

Calls 2

#updateContextMethod · 0.95
updateMethod · 0.65

Tested by

no test coverage detected