(result, search, wordlist, formatter)
| 50 | } |
| 51 | |
| 52 | function addMatches(result, search, wordlist, formatter) { |
| 53 | for (var word in wordlist) { |
| 54 | if (!wordlist.hasOwnProperty(word)) continue; |
| 55 | if (Array.isArray(wordlist)) { |
| 56 | word = wordlist[word]; |
| 57 | } |
| 58 | if (match(search, word)) { |
| 59 | result.push(formatter(word)); |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | function cleanName(name) { |
| 65 | // Get rid name from backticks(`) and preceding dot(.) |
no test coverage detected