MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / isDomainOrSubdomain

Function isDomainOrSubdomain

out/cli.cjs:6936–6940  ·  view source on GitHub ↗
(destination, original)

Source from the content-addressed store, hash-verified

6934 var URL$1 = Url.URL || whatwgUrl.URL;
6935 var PassThrough$1 = Stream3.PassThrough;
6936 var isDomainOrSubdomain = function isDomainOrSubdomain2(destination, original) {
6937 const orig = new URL$1(original).hostname;
6938 const dest = new URL$1(destination).hostname;
6939 return orig === dest || orig[orig.length - dest.length - 1] === "." && orig.endsWith(dest);
6940 };
6941 var isSameProtocol = function isSameProtocol2(destination, original) {
6942 const orig = new URL$1(original).protocol;
6943 const dest = new URL$1(destination).protocol;

Callers 1

fetch4Function · 0.85

Calls 1

endsWithMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…