(msg: RenderableMessage)
| 22 | * .toLowerCase()d the result, re-lowering ~1.5MB on every keystroke |
| 23 | * (the backspace hang). Returns '' for non-searchable types. */ |
| 24 | export function renderableSearchText(msg: RenderableMessage): string { |
| 25 | const cached = searchTextCache.get(msg) |
| 26 | if (cached !== undefined) return cached |
| 27 | const result = computeSearchText(msg).toLowerCase() |
| 28 | searchTextCache.set(msg, result) |
| 29 | return result |
| 30 | } |
| 31 | |
| 32 | function computeSearchText(msg: RenderableMessage): string { |
| 33 | let raw = '' |
no test coverage detected