(p)
| 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 | }); |
no test coverage detected