MCPcopy Create free account
hub / github.com/error311/FileRise / normalizeFolderPath

Function normalizeFolderPath

public/js/aiChat.js:109–119  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

107}
108
109function normalizeFolderPath(value) {
110 let v = String(value || '').trim();
111 if (v === '' || v.toLowerCase() === 'root') return 'root';
112 v = v.replace(/\\/g, '/');
113 v = v.replace(/^\/+|\/+$/g, '');
114 if (v.toLowerCase() === 'root') return 'root';
115 if (v.toLowerCase().startsWith('root/')) {
116 v = v.slice(5);
117 }
118 return v === '' ? 'root' : v;
119}
120
121function parentFolderPath(folder) {
122 const f = normalizeFolderPath(folder);

Callers 11

parentFolderPathFunction · 0.70
getActiveFolderFunction · 0.70
refreshFolderViewFunction · 0.70
setWorkspaceFunction · 0.70
updateScopeSummaryFunction · 0.70
isCurrentFolderFunction · 0.70
sendMessageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected