From 7a52ddeba2a68388b544f529d2d92104420f77b0 Mon Sep 17 00:00:00 2001 From: Shipwreckt Date: Fri, 31 Oct 2025 20:02:14 +0000 Subject: Changed from static to 11ty! --- node_modules/@11ty/eleventy/src/Util/DirContains.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 node_modules/@11ty/eleventy/src/Util/DirContains.js (limited to 'node_modules/@11ty/eleventy/src/Util/DirContains.js') diff --git a/node_modules/@11ty/eleventy/src/Util/DirContains.js b/node_modules/@11ty/eleventy/src/Util/DirContains.js new file mode 100644 index 0000000..c19990c --- /dev/null +++ b/node_modules/@11ty/eleventy/src/Util/DirContains.js @@ -0,0 +1,10 @@ +import path from "node:path"; + +// Returns true if subfolder is in parent (accepts absolute or relative paths for both) +export default function (parentFolder, subFolder) { + // path.resolve returns an absolute path + if (path.resolve(subFolder).startsWith(path.resolve(parentFolder))) { + return true; + } + return false; +} -- cgit v1.2.3