MCPcopy
hub / github.com/di-sukharev/opencommit / spreadUrlObject

Function spreadUrlObject

out/cli.cjs:25408–25421  ·  view source on GitHub ↗
(urlObject, target)

Source from the content-addressed store, hash-verified

25406 return input;
25407 }
25408 function spreadUrlObject(urlObject, target) {
25409 var spread3 = target || {};
25410 for (var key of preservedUrlFields) {
25411 spread3[key] = urlObject[key];
25412 }
25413 if (spread3.hostname.startsWith("[")) {
25414 spread3.hostname = spread3.hostname.slice(1, -1);
25415 }
25416 if (spread3.port !== "") {
25417 spread3.port = Number(spread3.port);
25418 }
25419 spread3.path = spread3.search ? spread3.pathname + spread3.search : spread3.pathname;
25420 return spread3;
25421 }
25422 function removeMatchingHeaders(regex, headers) {
25423 var lastValue;
25424 for (var header in headers) {

Callers 2

request3Function · 0.85

Calls 2

startsWithMethod · 0.80
sliceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…