UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

2 lines (1 loc) • 276 B
export const filterGroups=(r,n)=>{const t=n.trim().toLowerCase();if(!t)return r;const o=[];for(const e of r){if(e.groupName.toLowerCase().includes(t)){o.push(e);continue}const s=e.items.filter(i=>i.name.toLowerCase().includes(t));s.length>0&&o.push({...e,items:s})}return o};