(element: HTMLElement, str: string, value: string)
| 197 | |
| 198 | // Highlight search fragment in text |
| 199 | const highlighted = (element: HTMLElement, str: string, value: string) => { |
| 200 | const location = str.toLowerCase().indexOf(value); |
| 201 | element.innerHTML = |
| 202 | location == -1 |
| 203 | ? str |
| 204 | : str.substring(0, location) + |
| 205 | '<em>' + |
| 206 | str.substring(location, location + value.length) + |
| 207 | '</em>' + |
| 208 | str.substring(location + value.length); |
| 209 | }; |
| 210 | |
| 211 | // Move hover class through the results |
| 212 | const moveHover = (current: any, next: any) => { |
no outgoing calls
no test coverage detected
searching dependent graphs…