* Given a list of words, lookup any matches in the database. * @param {string[]} words * @returns {Promise }
(words)
| 134 | * @returns {Promise<string[][]>} |
| 135 | */ |
| 136 | async function lookup(words) { |
| 137 | const index = new Index(); |
| 138 | const hits = await index.lookup(words); |
| 139 | index.quit(); |
| 140 | words.forEach((word, i) => { |
| 141 | console.log(`hits for "${word}":`, hits[i].join(', ')); |
| 142 | }); |
| 143 | return hits; |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * Provide a joined string with all descriptions from the response data |
no test coverage detected