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

Function depth

public/js/folderManager.js:860–860  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

858 // pick shallowest, then alpha
859 names.sort((a, b) => {
860 const depth = (p) => (p === 'root') ? 0 : p.split('/').filter(Boolean).length;
861 const d = depth(a) - depth(b);
862 return d !== 0 ? d : a.localeCompare(b);
863 });

Callers 1

chooseInitialFolderFunction · 0.85

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected