first
This commit is contained in:
19
node_modules/@11ty/eleventy/src/Util/FilePathUtil.js
generated
vendored
Normal file
19
node_modules/@11ty/eleventy/src/Util/FilePathUtil.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
class FilePathUtil {
|
||||
static isMatchingExtension(filepath, fileExtension) {
|
||||
if (!fileExtension) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(fileExtension || "").startsWith(".")) {
|
||||
fileExtension = "." + fileExtension;
|
||||
}
|
||||
|
||||
return filepath.endsWith(fileExtension);
|
||||
}
|
||||
|
||||
static getFileExtension(filepath) {
|
||||
return (filepath || "").split(".").pop();
|
||||
}
|
||||
}
|
||||
|
||||
export { FilePathUtil };
|
||||
Reference in New Issue
Block a user