@jsenv/urls
Advanced tools
Comparing version 1.2.1 to 1.2.2
{ | ||
"name": "@jsenv/urls", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -10,5 +10,6 @@ export const getCommonPathname = (pathname, otherPathname) => { | ||
const otherLength = otherPathname.length | ||
while (i < pathname.length) { | ||
while (i < length) { | ||
const char = pathname.charAt(i) | ||
const otherChar = otherPathname.charAt(i) | ||
i++ | ||
if (char === otherChar) { | ||
@@ -23,5 +24,8 @@ if (char === "/") { | ||
} else { | ||
if (char === "/" && i - 1 === otherLength) { | ||
commonPart += "/" | ||
commonPathname += commonPart | ||
} | ||
return commonPathname | ||
} | ||
i++ | ||
} | ||
@@ -28,0 +32,0 @@ if (length === otherLength) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23562
710