MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / buildURL

Method buildURL

out/cli.cjs:69772–69782  ·  view source on GitHub ↗
(path5, query)

Source from the content-addressed store, hash-verified

69770 throw err;
69771 }
69772 return { response, options, controller };
69773 }
69774 requestAPIList(Page2, options) {
69775 const request3 = this.makeRequest(options, null);
69776 return new PagePromise(this, request3, Page2);
69777 }
69778 buildURL(path5, query) {
69779 const url2 = isAbsoluteURL(path5) ? new URL(path5) : new URL(this.baseURL + (this.baseURL.endsWith("/") && path5.startsWith("/") ? path5.slice(1) : path5));
69780 const defaultQuery = this.defaultQuery();
69781 if (!isEmptyObj(defaultQuery)) {
69782 query = { ...defaultQuery, ...query };
69783 }
69784 if (typeof query === "object" && query && !Array.isArray(query)) {
69785 url2.search = this.stringifyQuery(query);

Callers 2

constructorMethod · 0.80
buildRequestMethod · 0.80

Calls 10

isAbsoluteURLFunction · 0.85
isEmptyObjFunction · 0.85
isAbsoluteURL3Function · 0.85
isEmptyObj2Function · 0.85
endsWithMethod · 0.80
startsWithMethod · 0.80
defaultQueryMethod · 0.80
stringifyQueryMethod · 0.80
sliceMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected