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

Function norm

public/js/fileDragDrop.js:319–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317
318 // optional: mirror PHP self/descendant guard so we fail fast
319 const norm = s => {
320 if (!s) return '';
321 return s.replace(/^[/\\]+|[/\\]+$/g, '');
322 };
323 const srcNorm = norm(source);
324 const dstNorm = destination === 'root' ? '' : norm(destination);
325

Callers 1

folderDropHandlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected