(query: FindQuery)
| 319 | } |
| 320 | |
| 321 | find(query: FindQuery): string[] { |
| 322 | return ( |
| 323 | this.getElements() |
| 324 | // fallow-ignore-next-line complexity |
| 325 | .filter((el) => { |
| 326 | if (query.tag && el.tag !== query.tag) return false; |
| 327 | if (query.text && !el.text?.includes(query.text)) return false; |
| 328 | if (query.name && el.attributes["data-name"] !== query.name) return false; |
| 329 | if (query.track !== undefined && el.trackIndex !== query.track) return false; |
| 330 | if (query.composition && !el.scopedId.startsWith(`${query.composition}/`)) return false; |
| 331 | return true; |
| 332 | }) |
| 333 | .map((el) => el.scopedId) |
| 334 | ); |
| 335 | } |
| 336 | |
| 337 | // ── Selection API ──────────────────────────────────────────────────────────── |
| 338 |
nothing calls this directly
no test coverage detected