@jsenv/filesystem
Advanced tools
Comparing version 2.7.1 to 2.7.2
{ | ||
"name": "@jsenv/filesystem", | ||
"version": "2.7.1", | ||
"version": "2.7.2", | ||
"description": "Collection of functions to interact with filesystem in Node.js", | ||
@@ -19,3 +19,4 @@ "license": "MIT", | ||
"publishConfig": { | ||
"access": "public" | ||
"access": "public", | ||
"registry": "https://registry.npmjs.org" | ||
}, | ||
@@ -59,2 +60,2 @@ "type": "module", | ||
} | ||
} | ||
} |
@@ -13,3 +13,2 @@ export const getCommonPathname = (pathname, otherPathname) => { | ||
const commonString = pathname.slice(0, firstDifferentCharacterIndex + 1) | ||
// the first different char is at firstDifferentCharacterIndex | ||
@@ -16,0 +15,0 @@ if (pathname.charAt(firstDifferentCharacterIndex) === "/") { |
@@ -11,5 +11,10 @@ import { urlToRessource } from "./urlToRessource.js" | ||
const searchSeparatorIndex = ressource.indexOf("?") | ||
return searchSeparatorIndex === -1 | ||
? ressource | ||
: ressource.slice(0, searchSeparatorIndex) | ||
if (searchSeparatorIndex > -1) { | ||
return ressource.slice(0, searchSeparatorIndex) | ||
} | ||
const hashIndex = ressource.indexOf("#") | ||
if (hashIndex > -1) { | ||
return ressource.slice(0, hashIndex) | ||
} | ||
return ressource | ||
} |
@@ -34,3 +34,2 @@ import { getCommonPathname } from "./internal/getCommonPathname.js" | ||
} | ||
const specificPathname = pathname.slice(commonPathname.length) | ||
@@ -37,0 +36,0 @@ const baseSpecificPathname = basePathname.slice(commonPathname.length) |
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
99746
2760