MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / areSame

Function areSame

src/utils/Url.js:37–44  ·  view source on GitHub ↗

* Checks if given urls are same or not * @param {...String} urls * @returns {Boolean}

(...urls)

Source from the content-addressed store, hash-verified

35 * @returns {Boolean}
36 */
37 areSame(...urls) {
38 let firstUrl = urls[0];
39 if (firstUrl.endsWith("/")) firstUrl = firstUrl.slice(0, -1);
40 return urls.every((url) => {
41 if (url.endsWith("/")) url = url.slice(0, -1);
42 return firstUrl === url;
43 });
44 },
45
46 /**
47 *

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected