MCPcopy Index your code
hub / github.com/nodejs/node / #getSearchFromContext

Method #getSearchFromContext

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

Source from the content-addressed store, hash-verified

887 }
888
889 #getSearchFromContext() {
890 if (!this.#context.hasSearch) return '';
891 let endsAt = this.#context.href.length;
892 if (this.#context.hasHash) endsAt = this.#context.hash_start;
893 if (endsAt - this.#context.search_start <= 1) return '';
894 return StringPrototypeSlice(this.#context.href, this.#context.search_start, endsAt);
895 }
896
897 #getSearchFromParams() {
898 if (!this.#searchParams?.size) return '';

Callers 3

#updateContextMethod · 0.95
searchMethod · 0.95
searchParamsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected