(openPath: number[], path: number[])
| 64 | } |
| 65 | |
| 66 | function isPathOpen(openPath: number[], path: number[]): boolean { |
| 67 | if (path.length > openPath.length) { |
| 68 | return false; |
| 69 | } |
| 70 | return path.every((segment, index) => openPath[index] === segment); |
| 71 | } |
| 72 | |
| 73 | function getVisibleItems(items: ContextMenuItem[]): ContextMenuItem[] { |
| 74 | return items.filter((item) => item.visible !== false); |
no outgoing calls
no test coverage detected