(weatherData)
| 1288 | FUNCTION weatherText |
| 1289 | ------------------------------------------------------------------*/ |
| 1290 | function weatherText(weatherData) { |
| 1291 | let desc = weatherData.desc.slice(0, 1).toUpperCase() + weatherData.desc.slice(1, weatherData.desc.length); // capitalize first letter of the data |
| 1292 | const text = `${desc} today. It's currently ${weatherData.temp}°; the high will be ${weatherData.high}°.`; |
| 1293 | let wrapText = (s, w) => s.replace( |
| 1294 | new RegExp(`(?![^\\n]{1,${w}}$)([^\\n]{1,${w}})\\s`, 'g'), '$1\n' |
| 1295 | ); |
| 1296 | const text0 = wrapText(text,50); |
| 1297 | return text0; |
| 1298 | } |
| 1299 | /*------------------------------------------------------------------ |
| 1300 | FUNCTION calendarText |
| 1301 | ------------------------------------------------------------------*/ |
nothing calls this directly
no test coverage detected