* Provide a joined string with all descriptions from the response data * @param {TextAnnotation[]} texts Response data from the Vision API * @returns {string} A joined string containing al descriptions
(texts)
| 149 | * @returns {string} A joined string containing al descriptions |
| 150 | */ |
| 151 | function extractDescription(texts) { |
| 152 | let document = ''; |
| 153 | texts.forEach(text => { |
| 154 | document += text.description || ''; |
| 155 | }); |
| 156 | return document.toLowerCase(); |
| 157 | } |
| 158 | |
| 159 | /** |
| 160 | * Grab the description, and push it into redis. |
no outgoing calls
no test coverage detected