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

Method hostname

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

Source from the content-addressed store, hash-verified

1069 }
1070
1071 get hostname() {
1072 let startsAt = this.#context.host_start;
1073 // host_start might be "@" if the URL has credentials
1074 if (this.#context.href[startsAt] === '@') {
1075 startsAt++;
1076 }
1077 return StringPrototypeSlice(this.#context.href, startsAt, this.#context.host_end);
1078 }
1079
1080 set hostname(value) {
1081 const href = bindingUrl.update(this.#context.href, updateActions.kHostname, `${value}`);

Callers

nothing calls this directly

Calls 2

#updateContextMethod · 0.95
updateMethod · 0.65

Tested by

no test coverage detected