const s=(n,f="children")=>(n.forEach(r=>{if(r[f]&&r[f].length>0)return r.isLeaf=!1,s(r[f]);r.isLeaf=!0}),n);export{s as f};