MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / isInsideOpenFolder

Function isInsideOpenFolder

src/lib/openFolder.js:1019–1025  ·  view source on GitHub ↗
(url, folderUrl)

Source from the content-addressed store, hash-verified

1017}
1018
1019function isInsideOpenFolder(url, folderUrl) {
1020 const urlKey = normalizeUrlPathKey(url);
1021 const folderKey = normalizeUrlPathKey(folderUrl);
1022 if (!urlKey || !folderKey) return false;
1023
1024 return urlKey === folderKey || urlKey.startsWith(`${folderKey}/`);
1025}
1026
1027function appendUrlPathSuffix(url, suffix) {
1028 if (!suffix) return url;

Callers 2

openFolder.jsFile · 0.85

Calls 1

normalizeUrlPathKeyFunction · 0.85

Tested by

no test coverage detected