* Find a rels entry by type substring match.
(rels: Map<string, RelEntry>, typeSubstring: string)
| 64 | * Find a rels entry by type substring match. |
| 65 | */ |
| 66 | function findRelByType(rels: Map<string, RelEntry>, typeSubstring: string): RelEntry | undefined { |
| 67 | for (const [, entry] of rels) { |
| 68 | if (entry.type.includes(typeSubstring)) { |
| 69 | return entry |
| 70 | } |
| 71 | } |
| 72 | return undefined |
| 73 | } |
| 74 | |
| 75 | /** |
| 76 | * Find ALL rels entries matching a type substring, returning [rId, entry] pairs. |