full site update
This commit is contained in:
14
node_modules/@astrojs/internal-helpers/dist/path.js
generated
vendored
14
node_modules/@astrojs/internal-helpers/dist/path.js
generated
vendored
@@ -10,6 +10,13 @@ function prependForwardSlash(path) {
|
||||
function collapseDuplicateSlashes(path) {
|
||||
return path.replace(/(?<!:)\/{2,}/g, "/");
|
||||
}
|
||||
const MANY_TRAILING_SLASHES = /\/{2,}$/g;
|
||||
function collapseDuplicateTrailingSlashes(path, trailingSlash) {
|
||||
if (!path) {
|
||||
return path;
|
||||
}
|
||||
return path.replace(MANY_TRAILING_SLASHES, trailingSlash ? "/" : "") || "/";
|
||||
}
|
||||
function removeTrailingForwardSlash(path) {
|
||||
return path.endsWith("/") ? path.slice(0, path.length - 1) : path;
|
||||
}
|
||||
@@ -77,11 +84,18 @@ function removeBase(path, base) {
|
||||
}
|
||||
return path;
|
||||
}
|
||||
const WITH_FILE_EXT = /\/[^/]+\.\w+$/;
|
||||
function hasFileExtension(path) {
|
||||
return WITH_FILE_EXT.test(path);
|
||||
}
|
||||
export {
|
||||
MANY_TRAILING_SLASHES,
|
||||
appendExtension,
|
||||
appendForwardSlash,
|
||||
collapseDuplicateSlashes,
|
||||
collapseDuplicateTrailingSlashes,
|
||||
fileExtension,
|
||||
hasFileExtension,
|
||||
isRelativePath,
|
||||
isRemotePath,
|
||||
joinPaths,
|
||||
|
Reference in New Issue
Block a user