@angelrove/forecast-utils 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/README.md +1046 -0
  2. package/dist/types/OpenMeteo/conf.d.ts +13 -0
  3. package/dist/types/OpenMeteo/current/fetchParams.d.ts +1 -0
  4. package/dist/types/OpenMeteo/current/transformer.d.ts +13 -0
  5. package/dist/types/OpenMeteo/current/useForecastCurrent.d.ts +14 -0
  6. package/dist/types/OpenMeteo/daily/fetchParams.d.ts +1 -0
  7. package/dist/types/OpenMeteo/daily/transformer.d.ts +9 -0
  8. package/dist/types/OpenMeteo/daily/useForecastDaily.d.ts +14 -0
  9. package/dist/types/OpenMeteo/helpers.d.ts +10 -0
  10. package/dist/types/OpenMeteo/hourly/fetchParams.d.ts +1 -0
  11. package/dist/types/OpenMeteo/hourly/useForecastHourly.d.ts +15 -0
  12. package/dist/types/OpenMeteo/weatherSymbol/lib/WeatherCodesEn.d.ts +43 -0
  13. package/dist/types/OpenMeteo/weatherSymbol/lib/WeatherCodesEs.d.ts +43 -0
  14. package/dist/types/OpenMeteo/weatherSymbol/lib/getWeatherCodeEntry.d.ts +7 -0
  15. package/dist/types/OpenMeteo/weatherSymbol/weatherSymbol.d.ts +13 -0
  16. package/dist/types/astronomy/moon/MoonCalc.d.ts +63 -0
  17. package/dist/types/astronomy/moon/parseBasicData.d.ts +8 -0
  18. package/dist/types/astronomy/sun/SunCalc.d.ts +73 -0
  19. package/dist/types/astronomy/sun/helpers.d.ts +0 -0
  20. package/dist/types/astronomy/timeZoneInfo.d.ts +10 -0
  21. package/dist/types/astronomy/timehelpers.d.ts +27 -0
  22. package/dist/types/astronomy/types.d.ts +43 -0
  23. package/dist/types/geolocation/getGeolocation.d.ts +12 -0
  24. package/dist/types/geolocation/lib/geolocation.d.ts +10 -0
  25. package/dist/types/geolocation/lib/geolocationCapacitor.d.ts +10 -0
  26. package/dist/types/geolocation/lib/reversegeocoding.d.ts +19 -0
  27. package/dist/types/index.d.ts +14 -0
  28. package/dist/types/utils/degreesToCompass.d.ts +11 -0
  29. package/dist/types/utils/warning.d.ts +46 -0
  30. package/dist/types/utils/wind/WindArrow.d.ts +32 -0
  31. package/dist/types/utils/wind/windArrowTx.d.ts +9 -0
  32. package/dist/types/utils/wind/windLevel.d.ts +29 -0
  33. package/package.json +40 -0
  34. package/src/OpenMeteo/conf.js +47 -0
  35. package/src/OpenMeteo/current/fetchParams.js +21 -0
  36. package/src/OpenMeteo/current/transformer.js +37 -0
  37. package/src/OpenMeteo/current/useForecastCurrent.js +34 -0
  38. package/src/OpenMeteo/daily/fetchParams.js +9 -0
  39. package/src/OpenMeteo/daily/transformer.js +21 -0
  40. package/src/OpenMeteo/daily/useForecastDaily.js +38 -0
  41. package/src/OpenMeteo/helpers.js +19 -0
  42. package/src/OpenMeteo/hourly/fetchParams.js +12 -0
  43. package/src/OpenMeteo/hourly/useForecastHourly.js +42 -0
  44. package/src/OpenMeteo/weatherSymbol/lib/WeatherCodesEn.js +89 -0
  45. package/src/OpenMeteo/weatherSymbol/lib/WeatherCodesEs.js +81 -0
  46. package/src/OpenMeteo/weatherSymbol/lib/getWeatherCodeEntry.js +12 -0
  47. package/src/OpenMeteo/weatherSymbol/weatherSymbol.js +60 -0
  48. package/src/astronomy/moon/MoonCalc.js +171 -0
  49. package/src/astronomy/moon/parseBasicData.js +38 -0
  50. package/src/astronomy/sun/SunCalc.js +167 -0
  51. package/src/astronomy/sun/helpers.js +0 -0
  52. package/src/astronomy/timeZoneInfo.js +89 -0
  53. package/src/astronomy/timehelpers.js +69 -0
  54. package/src/astronomy/types.js +30 -0
  55. package/src/geolocation/getGeolocation.js +49 -0
  56. package/src/geolocation/lib/geolocation.js +44 -0
  57. package/src/geolocation/lib/geolocationCapacitor.js +21 -0
  58. package/src/geolocation/lib/reversegeocoding.js +109 -0
  59. package/src/index.js +38 -0
  60. package/src/utils/degreesToCompass.js +51 -0
  61. package/src/utils/warning.js +130 -0
  62. package/src/utils/wind/WindArrow.jsx +53 -0
  63. package/src/utils/wind/windArrowTx.js +24 -0
  64. package/src/utils/wind/windLevel.js +49 -0
package/README.md ADDED
@@ -0,0 +1,1046 @@
1
+ ## Modules
2
+
3
+ <dl>
4
+ <dt><a href="#module_MoonCalc">MoonCalc</a></dt>
5
+ <dd><p>MoonCalc for calculating moon times, positions, and phases.</p>
6
+ <ul>
7
+ <li>import { MoonCalc } from &#39;@angelrov/forecast&#39;;</li>
8
+ </ul>
9
+ </dd>
10
+ <dt><a href="#module_SunCalc">SunCalc</a></dt>
11
+ <dd><p>SunCalc for calculating solar times, positions, and phases. </p>
12
+ <ul>
13
+ <li>import { SunCalc } from &#39;@angelrov/forecast&#39;;</li>
14
+ </ul>
15
+ </dd>
16
+ <dt><a href="#module_astronomy/time-date">astronomy/time-date</a></dt>
17
+ <dd></dd>
18
+ <dt><a href="#module_astronomy/time-date">astronomy/time-date</a></dt>
19
+ <dd></dd>
20
+ <dt><a href="#module_astronomy/types">astronomy/types</a></dt>
21
+ <dd></dd>
22
+ <dt><a href="#module_Geolocation">Geolocation</a></dt>
23
+ <dd></dd>
24
+ <dt><a href="#OpenMeteo_current">OpenMeteo:current</a></dt>
25
+ <dd></dd>
26
+ <dt><a href="#OpenMeteo_daily">OpenMeteo:daily</a></dt>
27
+ <dd></dd>
28
+ <dt><a href="#OpenMeteo_hourly">OpenMeteo:hourly</a></dt>
29
+ <dd></dd>
30
+ <dt><a href="#OpenMeteo_weatherSymbol">OpenMeteo:weatherSymbol</a></dt>
31
+ <dd></dd>
32
+ <dt><a href="#module_utils">utils</a></dt>
33
+ <dd></dd>
34
+ <dt><a href="#module_utils">utils</a></dt>
35
+ <dd></dd>
36
+ <dt><a href="#module_utils">utils</a></dt>
37
+ <dd></dd>
38
+ <dt><a href="#module_utils">utils</a></dt>
39
+ <dd></dd>
40
+ </dl>
41
+
42
+ <a name="module_MoonCalc"></a>
43
+
44
+ ## MoonCalc
45
+ MoonCalc for calculating moon times, positions, and phases.
46
+ - import { MoonCalc } from '@angelrov/forecast';
47
+
48
+
49
+ * [MoonCalc](#module_MoonCalc)
50
+ * [~phasesES](#module_MoonCalc..phasesES) : <code>Object.&lt;string, string&gt;</code>
51
+ * [~data(latitude, longitude, [date], [language])](#module_MoonCalc..data) ⇒ <code>MoonData</code>
52
+ * [~dataExt(latitude, longitude, [date], [language])](#module_MoonCalc..dataExt) ⇒ <code>Object</code>
53
+ * [~emoji(latitude, longitude, [date])](#module_MoonCalc..emoji) ⇒ <code>string</code>
54
+ * [~times(latitude, longitude, timezoneId, date)](#module_MoonCalc..times) ⇒ <code>Object</code>
55
+ * [~getUpOrDown(altitude, highest)](#module_MoonCalc..getUpOrDown) ⇒ <code>string</code>
56
+
57
+ <a name="module_MoonCalc..phasesES"></a>
58
+
59
+ ### MoonCalc~phasesES : <code>Object.&lt;string, string&gt;</code>
60
+ Mapa de fases lunares.
61
+
62
+ **Kind**: inner constant of [<code>MoonCalc</code>](#module_MoonCalc)
63
+ <a name="module_MoonCalc..data"></a>
64
+
65
+ ### MoonCalc~data(latitude, longitude, [date], [language]) ⇒ <code>MoonData</code>
66
+ **Kind**: inner method of [<code>MoonCalc</code>](#module_MoonCalc)
67
+
68
+ | Param | Type | Default |
69
+ | --- | --- | --- |
70
+ | latitude | <code>number</code> | |
71
+ | longitude | <code>number</code> | |
72
+ | [date] | <code>Date</code> | <code>new Date()</code> |
73
+ | [language] | <code>string</code> | <code>&quot;es-ES&quot;</code> |
74
+
75
+ <a name="module_MoonCalc..dataExt"></a>
76
+
77
+ ### MoonCalc~dataExt(latitude, longitude, [date], [language]) ⇒ <code>Object</code>
78
+ Información de la luna para una fecha y hora dadas.
79
+ La fecha y hora se devolverán en la zona horaria local.
80
+
81
+ **Kind**: inner method of [<code>MoonCalc</code>](#module_MoonCalc)
82
+
83
+ | Param | Type | Default |
84
+ | --- | --- | --- |
85
+ | latitude | <code>number</code> | |
86
+ | longitude | <code>number</code> | |
87
+ | [date] | <code>Date</code> | <code>new Date()</code> |
88
+ | [language] | <code>string</code> | <code>&quot;es-ES&quot;</code> |
89
+
90
+ <a name="module_MoonCalc..emoji"></a>
91
+
92
+ ### MoonCalc~emoji(latitude, longitude, [date]) ⇒ <code>string</code>
93
+ **Kind**: inner method of [<code>MoonCalc</code>](#module_MoonCalc)
94
+ **Returns**: <code>string</code> - - Emoji of the moon phase
95
+
96
+ | Param | Type | Default |
97
+ | --- | --- | --- |
98
+ | latitude | <code>number</code> | |
99
+ | longitude | <code>number</code> | |
100
+ | [date] | <code>Date</code> | <code>new Date()</code> |
101
+
102
+ <a name="module_MoonCalc..times"></a>
103
+
104
+ ### MoonCalc~times(latitude, longitude, timezoneId, date) ⇒ <code>Object</code>
105
+ **Kind**: inner method of [<code>MoonCalc</code>](#module_MoonCalc)
106
+
107
+ | Param | Type |
108
+ | --- | --- |
109
+ | latitude | <code>number</code> |
110
+ | longitude | <code>number</code> |
111
+ | timezoneId | <code>string</code> |
112
+ | date | <code>Date</code> |
113
+
114
+ <a name="module_MoonCalc..getUpOrDown"></a>
115
+
116
+ ### MoonCalc~getUpOrDown(altitude, highest) ⇒ <code>string</code>
117
+ **Kind**: inner method of [<code>MoonCalc</code>](#module_MoonCalc)
118
+ **Returns**: <code>string</code> - - Up or down emoji
119
+
120
+ | Param | Type |
121
+ | --- | --- |
122
+ | altitude | <code>number</code> |
123
+ | highest | <code>Date</code> |
124
+
125
+ <a name="module_SunCalc"></a>
126
+
127
+ ## SunCalc
128
+ SunCalc for calculating solar times, positions, and phases.
129
+ - import { SunCalc } from '@angelrov/forecast';
130
+
131
+
132
+ * [SunCalc](#module_SunCalc)
133
+ * [~SunCalc](#module_SunCalc..SunCalc)
134
+ * [~all(date, latitude, longitude, timezoneId)](#module_SunCalc..all) ⇒ <code>Object</code>
135
+ * [~times(date, latitude, longitude, timezoneId)](#module_SunCalc..times) ⇒ <code>Object</code>
136
+ * [~getSolarTime(date, lng, offsetSign, offset)](#module_SunCalc..getSolarTime) ⇒ <code>string</code>
137
+ * [~position(latitude, longitude)](#module_SunCalc..position) ⇒ <code>Object</code>
138
+ * [~getIsNight(lat, lon, timezoneId, date, dateStr)](#module_SunCalc..getIsNight) ⇒ <code>boolean</code>
139
+ * [~getPhase(altitude, noon)](#module_SunCalc..getPhase) ⇒ <code>string</code>
140
+
141
+ <a name="module_SunCalc..SunCalc"></a>
142
+
143
+ ### SunCalc~SunCalc
144
+ IMPORTANTE!!:
145
+ ¡Solo proporcionar HORA LOCAL DEL SISTEMA!: 'new Date()'
146
+ La única excepción es 'getSolarTime()': hay que darle la hora local correspondiente a la localización dada.
147
+
148
+ **Kind**: inner constant of [<code>SunCalc</code>](#module_SunCalc)
149
+ <a name="module_SunCalc..all"></a>
150
+
151
+ ### SunCalc~all(date, latitude, longitude, timezoneId) ⇒ <code>Object</code>
152
+ **Kind**: inner method of [<code>SunCalc</code>](#module_SunCalc)
153
+
154
+ | Param | Type |
155
+ | --- | --- |
156
+ | date | <code>Date</code> |
157
+ | latitude | <code>number</code> |
158
+ | longitude | <code>number</code> |
159
+ | timezoneId | <code>string</code> |
160
+
161
+ <a name="module_SunCalc..times"></a>
162
+
163
+ ### SunCalc~times(date, latitude, longitude, timezoneId) ⇒ <code>Object</code>
164
+ **Kind**: inner method of [<code>SunCalc</code>](#module_SunCalc)
165
+
166
+ | Param | Type |
167
+ | --- | --- |
168
+ | date | <code>Date</code> |
169
+ | latitude | <code>number</code> |
170
+ | longitude | <code>number</code> |
171
+ | timezoneId | <code>string</code> |
172
+
173
+ <a name="module_SunCalc..getSolarTime"></a>
174
+
175
+ ### SunCalc~getSolarTime(date, lng, offsetSign, offset) ⇒ <code>string</code>
176
+ **Kind**: inner method of [<code>SunCalc</code>](#module_SunCalc)
177
+ **Returns**: <code>string</code> - - Local time in "HH:mm" format
178
+
179
+ | Param | Type | Description |
180
+ | --- | --- | --- |
181
+ | date | <code>Date</code> | |
182
+ | lng | <code>number</code> | |
183
+ | offsetSign | <code>string</code> | "+" or "-" |
184
+ | offset | <code>number</code> | UTC offset in hours |
185
+
186
+ <a name="module_SunCalc..position"></a>
187
+
188
+ ### SunCalc~position(latitude, longitude) ⇒ <code>Object</code>
189
+ **Kind**: inner method of [<code>SunCalc</code>](#module_SunCalc)
190
+
191
+ | Param | Type |
192
+ | --- | --- |
193
+ | latitude | <code>number</code> |
194
+ | longitude | <code>number</code> |
195
+
196
+ <a name="module_SunCalc..getIsNight"></a>
197
+
198
+ ### SunCalc~getIsNight(lat, lon, timezoneId, date, dateStr) ⇒ <code>boolean</code>
199
+ **Kind**: inner method of [<code>SunCalc</code>](#module_SunCalc)
200
+ **Returns**: <code>boolean</code> - - true if it's night, false otherwise
201
+
202
+ | Param | Type |
203
+ | --- | --- |
204
+ | lat | <code>number</code> |
205
+ | lon | <code>number</code> |
206
+ | timezoneId | <code>string</code> |
207
+ | date | <code>number</code> \| <code>Date</code> |
208
+ | dateStr | <code>string</code> |
209
+
210
+ <a name="module_SunCalc..getPhase"></a>
211
+
212
+ ### SunCalc~getPhase(altitude, noon) ⇒ <code>string</code>
213
+ **Kind**: inner method of [<code>SunCalc</code>](#module_SunCalc)
214
+ **Returns**: <code>string</code> - - The phase of the sun based on its altitude
215
+
216
+ | Param | Type |
217
+ | --- | --- |
218
+ | altitude | <code>number</code> |
219
+ | noon | <code>string</code> |
220
+
221
+ <a name="module_astronomy/time-date"></a>
222
+
223
+ ## astronomy/time-date
224
+
225
+ * [astronomy/time-date](#module_astronomy/time-date)
226
+ * [.timeString([date], [sec])](#module_astronomy/time-date.timeString) ⇒ <code>string</code>
227
+ * [.dateFormat([date])](#module_astronomy/time-date.dateFormat) ⇒ <code>string</code>
228
+ * [.getLocalTimeFromTz(timeZone, [date])](#module_astronomy/time-date.getLocalTimeFromTz) ⇒ <code>string</code>
229
+ * [.getLocalTimeInfo(apiKey, lat, lng)](#module_astronomy/time-date.getLocalTimeInfo) ⇒ <code>Promise.&lt;(any\|LocalTimeData)&gt;</code>
230
+
231
+ <a name="module_astronomy/time-date.timeString"></a>
232
+
233
+ ### astronomy/time-date.timeString([date], [sec]) ⇒ <code>string</code>
234
+ Formatea una fecha a un string legible.
235
+
236
+ **Kind**: static method of [<code>astronomy/time-date</code>](#module_astronomy/time-date)
237
+ **Returns**: <code>string</code> - La fecha formateada.
238
+
239
+ | Param | Type | Default |
240
+ | --- | --- | --- |
241
+ | [date] | <code>Date</code> | |
242
+ | [sec] | <code>boolean</code> | <code>false</code> |
243
+
244
+ <a name="module_astronomy/time-date.dateFormat"></a>
245
+
246
+ ### astronomy/time-date.dateFormat([date]) ⇒ <code>string</code>
247
+ Formatea una fecha a un string legible.
248
+
249
+ **Kind**: static method of [<code>astronomy/time-date</code>](#module_astronomy/time-date)
250
+ **Returns**: <code>string</code> - La fecha formateada.
251
+
252
+ | Param | Type | Default | Description |
253
+ | --- | --- | --- | --- |
254
+ | [date] | <code>Date</code> | <code>new Date()</code> | La fecha a formatear. |
255
+
256
+ <a name="module_astronomy/time-date.getLocalTimeFromTz"></a>
257
+
258
+ ### astronomy/time-date.getLocalTimeFromTz(timeZone, [date]) ⇒ <code>string</code>
259
+ Get local time from timezone
260
+
261
+ **Kind**: static method of [<code>astronomy/time-date</code>](#module_astronomy/time-date)
262
+ **Returns**: <code>string</code> - - The formatted local time string.
263
+
264
+ | Param | Type | Default | Description |
265
+ | --- | --- | --- | --- |
266
+ | timeZone | <code>string</code> | | The timezone string (e.g., 'America/New_York'). |
267
+ | [date] | <code>Date</code> \| <code>number</code> | <code>new Date()</code> | The date object to format. Defaults to the current date. |
268
+
269
+ <a name="module_astronomy/time-date.getLocalTimeInfo"></a>
270
+
271
+ ### astronomy/time-date.getLocalTimeInfo(apiKey, lat, lng) ⇒ <code>Promise.&lt;(any\|LocalTimeData)&gt;</code>
272
+ Google API: Get local time from any location
273
+
274
+ **Kind**: static method of [<code>astronomy/time-date</code>](#module_astronomy/time-date)
275
+ **Returns**: <code>Promise.&lt;(any\|LocalTimeData)&gt;</code> - - An object containing the local time and timezone information:
276
+ **Throws**:
277
+
278
+ - <code>Error</code> - If the API request fails or returns an error status.
279
+
280
+
281
+ | Param | Type | Description |
282
+ | --- | --- | --- |
283
+ | apiKey | <code>string</code> | GoogleMaps API key. |
284
+ | lat | <code>number</code> | |
285
+ | lng | <code>number</code> | |
286
+
287
+ <a name="module_astronomy/time-date"></a>
288
+
289
+ ## astronomy/time-date
290
+
291
+ * [astronomy/time-date](#module_astronomy/time-date)
292
+ * [.timeString([date], [sec])](#module_astronomy/time-date.timeString) ⇒ <code>string</code>
293
+ * [.dateFormat([date])](#module_astronomy/time-date.dateFormat) ⇒ <code>string</code>
294
+ * [.getLocalTimeFromTz(timeZone, [date])](#module_astronomy/time-date.getLocalTimeFromTz) ⇒ <code>string</code>
295
+ * [.getLocalTimeInfo(apiKey, lat, lng)](#module_astronomy/time-date.getLocalTimeInfo) ⇒ <code>Promise.&lt;(any\|LocalTimeData)&gt;</code>
296
+
297
+ <a name="module_astronomy/time-date.timeString"></a>
298
+
299
+ ### astronomy/time-date.timeString([date], [sec]) ⇒ <code>string</code>
300
+ Formatea una fecha a un string legible.
301
+
302
+ **Kind**: static method of [<code>astronomy/time-date</code>](#module_astronomy/time-date)
303
+ **Returns**: <code>string</code> - La fecha formateada.
304
+
305
+ | Param | Type | Default |
306
+ | --- | --- | --- |
307
+ | [date] | <code>Date</code> | |
308
+ | [sec] | <code>boolean</code> | <code>false</code> |
309
+
310
+ <a name="module_astronomy/time-date.dateFormat"></a>
311
+
312
+ ### astronomy/time-date.dateFormat([date]) ⇒ <code>string</code>
313
+ Formatea una fecha a un string legible.
314
+
315
+ **Kind**: static method of [<code>astronomy/time-date</code>](#module_astronomy/time-date)
316
+ **Returns**: <code>string</code> - La fecha formateada.
317
+
318
+ | Param | Type | Default | Description |
319
+ | --- | --- | --- | --- |
320
+ | [date] | <code>Date</code> | <code>new Date()</code> | La fecha a formatear. |
321
+
322
+ <a name="module_astronomy/time-date.getLocalTimeFromTz"></a>
323
+
324
+ ### astronomy/time-date.getLocalTimeFromTz(timeZone, [date]) ⇒ <code>string</code>
325
+ Get local time from timezone
326
+
327
+ **Kind**: static method of [<code>astronomy/time-date</code>](#module_astronomy/time-date)
328
+ **Returns**: <code>string</code> - - The formatted local time string.
329
+
330
+ | Param | Type | Default | Description |
331
+ | --- | --- | --- | --- |
332
+ | timeZone | <code>string</code> | | The timezone string (e.g., 'America/New_York'). |
333
+ | [date] | <code>Date</code> \| <code>number</code> | <code>new Date()</code> | The date object to format. Defaults to the current date. |
334
+
335
+ <a name="module_astronomy/time-date.getLocalTimeInfo"></a>
336
+
337
+ ### astronomy/time-date.getLocalTimeInfo(apiKey, lat, lng) ⇒ <code>Promise.&lt;(any\|LocalTimeData)&gt;</code>
338
+ Google API: Get local time from any location
339
+
340
+ **Kind**: static method of [<code>astronomy/time-date</code>](#module_astronomy/time-date)
341
+ **Returns**: <code>Promise.&lt;(any\|LocalTimeData)&gt;</code> - - An object containing the local time and timezone information:
342
+ **Throws**:
343
+
344
+ - <code>Error</code> - If the API request fails or returns an error status.
345
+
346
+
347
+ | Param | Type | Description |
348
+ | --- | --- | --- |
349
+ | apiKey | <code>string</code> | GoogleMaps API key. |
350
+ | lat | <code>number</code> | |
351
+ | lng | <code>number</code> | |
352
+
353
+ <a name="module_astronomy/types"></a>
354
+
355
+ ## astronomy/types
356
+
357
+ * [astronomy/types](#module_astronomy/types)
358
+ * [~AstroPosition](#module_astronomy/types..AstroPosition) : <code>Object</code>
359
+ * [~MoonData](#module_astronomy/types..MoonData) : <code>Object</code>
360
+ * [~LocalTimeData](#module_astronomy/types..LocalTimeData) : <code>Object</code>
361
+
362
+ <a name="module_astronomy/types..AstroPosition"></a>
363
+
364
+ ### astronomy/types~AstroPosition : <code>Object</code>
365
+ **Kind**: inner typedef of [<code>astronomy/types</code>](#module_astronomy/types)
366
+ **Properties**
367
+
368
+ | Name | Type |
369
+ | --- | --- |
370
+ | altitude | <code>number</code> |
371
+ | azimuth | <code>number</code> |
372
+ | direction | <code>string</code> |
373
+ | direction_full | <code>string</code> |
374
+
375
+ <a name="module_astronomy/types..MoonData"></a>
376
+
377
+ ### astronomy/types~MoonData : <code>Object</code>
378
+ **Kind**: inner typedef of [<code>astronomy/types</code>](#module_astronomy/types)
379
+ **Properties**
380
+
381
+ | Name | Type | Description |
382
+ | --- | --- | --- |
383
+ | position | <code>AstroPosition</code> | |
384
+ | next | <code>Object</code> | |
385
+ | next.newMoon | <code>string</code> | Date of the next new moon. |
386
+ | next.fullMoon | <code>string</code> | Date of the next full moon. |
387
+
388
+ <a name="module_astronomy/types..LocalTimeData"></a>
389
+
390
+ ### astronomy/types~LocalTimeData : <code>Object</code>
391
+ **Kind**: inner typedef of [<code>astronomy/types</code>](#module_astronomy/types)
392
+ **Properties**
393
+
394
+ | Name | Type | Description |
395
+ | --- | --- | --- |
396
+ | time | <code>Date</code> | The local time. |
397
+ | timeStr | <code>string</code> | The formatted local time string. |
398
+ | timezone | <code>string</code> | The timezone name. |
399
+ | timezoneId | <code>string</code> | The timezone ID. |
400
+ | offset | <code>number</code> | The UTC offset in hours. |
401
+ | offsetSign | <code>string</code> | The sign of the offset ('+' or '-'). |
402
+ | dstOffset | <code>number</code> | The DST offset in hours. |
403
+
404
+ <a name="module_Geolocation"></a>
405
+
406
+ ## Geolocation
407
+ <a name="exp_module_Geolocation--module.exports"></a>
408
+
409
+ ### module.exports() ⇒ <code>Promise.&lt;{latitude: number, longitude: number, formatted\_address: string}&gt;</code> ⏏
410
+ Get the current geolocation of the device and reverse
411
+ geocode it to get the address.
412
+
413
+ **Kind**: Exported function
414
+ **Throws**:
415
+
416
+ - <code>Error</code> If geolocation is not supported or permission is denied.
417
+
418
+ <a name="OpenMeteo_current"></a>
419
+
420
+ ## OpenMeteo:current
421
+ <a name="OpenMeteo_current.useForecastCurrent"></a>
422
+
423
+ ### OpenMeteo:current.useForecastCurrent(lat, lon, refreshIntervalMin) ⇒ <code>Object</code>
424
+ Custom hook to fetch current weather data from OpenMeteo API.
425
+
426
+ **Kind**: static method of [<code>OpenMeteo:current</code>](#OpenMeteo_current)
427
+
428
+ | Param | Type |
429
+ | --- | --- |
430
+ | lat | <code>number</code> |
431
+ | lon | <code>number</code> |
432
+ | refreshIntervalMin | <code>number</code> |
433
+
434
+ <a name="OpenMeteo_daily"></a>
435
+
436
+ ## OpenMeteo:daily
437
+ <a name="OpenMeteo_daily.useForecastDaily"></a>
438
+
439
+ ### OpenMeteo:daily.useForecastDaily(lat, lon, refreshIntervalMin) ⇒ <code>Object</code>
440
+ Custom hook to fetch daily forecast (10 days) data from OpenMeteo API.
441
+ https://api.open-meteo.com/v1/forecast?timezone=auto&latitude=36.6644363&longitude=-4.5108962&forecast_days=10&daily=weathercode
442
+
443
+ **Kind**: static method of [<code>OpenMeteo:daily</code>](#OpenMeteo_daily)
444
+
445
+ | Param | Type |
446
+ | --- | --- |
447
+ | lat | <code>number</code> |
448
+ | lon | <code>number</code> |
449
+ | refreshIntervalMin | <code>number</code> |
450
+
451
+ <a name="OpenMeteo_hourly"></a>
452
+
453
+ ## OpenMeteo:hourly
454
+ <a name="OpenMeteo_hourly.useForecastHourly"></a>
455
+
456
+ ### OpenMeteo:hourly.useForecastHourly(location, dayNum) ⇒ <code>Object</code>
457
+ Custom hook to fetch hourly forecast data for a given location and number of days from OpenMeteo API.
458
+
459
+ **Kind**: static method of [<code>OpenMeteo:hourly</code>](#OpenMeteo_hourly)
460
+
461
+ | Param | Type | Description |
462
+ | --- | --- | --- |
463
+ | location | <code>Object</code> | |
464
+ | dayNum | <code>number</code> | Number of days from today: -1 = 24 hours, 0 = today, 1 = tomorrow, ... |
465
+
466
+ <a name="OpenMeteo_weatherSymbol"></a>
467
+
468
+ ## OpenMeteo:weatherSymbol
469
+ <a name="OpenMeteo_weatherSymbol.weatherSymbol"></a>
470
+
471
+ ### OpenMeteo:weatherSymbol.weatherSymbol(code, [precipitation], night, dark) ⇒ <code>Object</code>
472
+ Get weather symbol and description based on the weather code.
473
+
474
+ **Kind**: static method of [<code>OpenMeteo:weatherSymbol</code>](#OpenMeteo_weatherSymbol)
475
+
476
+ | Param | Type |
477
+ | --- | --- |
478
+ | code | <code>any</code> |
479
+ | [precipitation] | <code>number</code> |
480
+ | night | <code>boolean</code> |
481
+ | dark | <code>boolean</code> |
482
+
483
+ <a name="module_utils"></a>
484
+
485
+ ## utils
486
+
487
+ * [utils](#module_utils)
488
+ * _static_
489
+ * [.degreesToCompass(degrees, language)](#module_utils.degreesToCompass) ⇒ <code>Object</code>
490
+ * [.getWarningByDays(precipitationSumToday, precipitationSumTomorrow, showersSumToday, showersSumTomorrow)](#module_utils.getWarningByDays) ⇒ <code>Object</code> \| <code>null</code>
491
+ * [.getWarning(precipitation, showers)](#module_utils.getWarning) ⇒ <code>Object</code> \| <code>null</code>
492
+ * [.windArrowTx(deg)](#module_utils.windArrowTx)
493
+ * [.getWindLevel(speed)](#module_utils.getWindLevel) ⇒ <code>WindLevel</code> \| <code>null</code>
494
+ * _inner_
495
+ * [~ALERT_LEVEL](#module_utils..ALERT_LEVEL) : <code>Array.&lt;AlertLevel&gt;</code>
496
+ * [~WIND_LEVELS](#module_utils..WIND_LEVELS) : <code>Array.&lt;WindLevel&gt;</code>
497
+ * [~getWarningRain(precipitation)](#module_utils..getWarningRain) ⇒ <code>Object</code> \| <code>null</code>
498
+ * [~getWarningShowers(showers)](#module_utils..getWarningShowers) ⇒ <code>Object</code> \| <code>null</code>
499
+ * [~AlertLevel](#module_utils..AlertLevel) : <code>Object</code>
500
+ * [~WindLevel](#module_utils..WindLevel) : <code>Object</code>
501
+
502
+ <a name="module_utils.degreesToCompass"></a>
503
+
504
+ ### utils.degreesToCompass(degrees, language) ⇒ <code>Object</code>
505
+ Convert degrees to compass designation
506
+
507
+ **Kind**: static method of [<code>utils</code>](#module_utils)
508
+
509
+ | Param | Type | Description |
510
+ | --- | --- | --- |
511
+ | degrees | <code>number</code> | |
512
+ | language | <code>string</code> | Language code ("en-US", "es-ES", "auto") |
513
+
514
+ <a name="module_utils.getWarningByDays"></a>
515
+
516
+ ### utils.getWarningByDays(precipitationSumToday, precipitationSumTomorrow, showersSumToday, showersSumTomorrow) ⇒ <code>Object</code> \| <code>null</code>
517
+ Get warning by today and tomorrow
518
+
519
+ **Kind**: static method of [<code>utils</code>](#module_utils)
520
+
521
+ | Param | Type |
522
+ | --- | --- |
523
+ | precipitationSumToday | <code>number</code> |
524
+ | precipitationSumTomorrow | <code>number</code> |
525
+ | showersSumToday | <code>number</code> |
526
+ | showersSumTomorrow | <code>number</code> |
527
+
528
+ <a name="module_utils.getWarning"></a>
529
+
530
+ ### utils.getWarning(precipitation, showers) ⇒ <code>Object</code> \| <code>null</code>
531
+ Get warning by precipitation and showers
532
+
533
+ **Kind**: static method of [<code>utils</code>](#module_utils)
534
+
535
+ | Param | Type |
536
+ | --- | --- |
537
+ | precipitation | <code>number</code> |
538
+ | showers | <code>number</code> |
539
+
540
+ <a name="module_utils.windArrowTx"></a>
541
+
542
+ ### utils.windArrowTx(deg)
543
+ Convert wind direction in degrees to an arrow representation.
544
+
545
+ **Kind**: static method of [<code>utils</code>](#module_utils)
546
+
547
+ | Param | Type | Description |
548
+ | --- | --- | --- |
549
+ | deg | <code>number</code> | Wind direction in degrees. |
550
+
551
+ <a name="module_utils.getWindLevel"></a>
552
+
553
+ ### utils.getWindLevel(speed) ⇒ <code>WindLevel</code> \| <code>null</code>
554
+ Return the wind level based on the speed.
555
+
556
+ **Kind**: static method of [<code>utils</code>](#module_utils)
557
+ **Returns**: <code>WindLevel</code> \| <code>null</code> - Wind level object or null if speed is null
558
+
559
+ | Param | Type | Description |
560
+ | --- | --- | --- |
561
+ | speed | <code>number</code> | Wind speed in km/h |
562
+
563
+ <a name="module_utils..ALERT_LEVEL"></a>
564
+
565
+ ### utils~ALERT\_LEVEL : <code>Array.&lt;AlertLevel&gt;</code>
566
+ Alert levels for rain and showers
567
+
568
+ **Kind**: inner constant of [<code>utils</code>](#module_utils)
569
+ <a name="module_utils..WIND_LEVELS"></a>
570
+
571
+ ### utils~WIND\_LEVELS : <code>Array.&lt;WindLevel&gt;</code>
572
+ Ordered list of wind levels.
573
+
574
+ **Kind**: inner constant of [<code>utils</code>](#module_utils)
575
+ <a name="module_utils..getWarningRain"></a>
576
+
577
+ ### utils~getWarningRain(precipitation) ⇒ <code>Object</code> \| <code>null</code>
578
+ Get warning by rain
579
+
580
+ **Kind**: inner method of [<code>utils</code>](#module_utils)
581
+
582
+ | Param | Type |
583
+ | --- | --- |
584
+ | precipitation | <code>number</code> |
585
+
586
+ <a name="module_utils..getWarningShowers"></a>
587
+
588
+ ### utils~getWarningShowers(showers) ⇒ <code>Object</code> \| <code>null</code>
589
+ Get warning by showers
590
+
591
+ **Kind**: inner method of [<code>utils</code>](#module_utils)
592
+
593
+ | Param | Type |
594
+ | --- | --- |
595
+ | showers | <code>number</code> |
596
+
597
+ <a name="module_utils..AlertLevel"></a>
598
+
599
+ ### utils~AlertLevel : <code>Object</code>
600
+ **Kind**: inner typedef of [<code>utils</code>](#module_utils)
601
+ **Properties**
602
+
603
+ | Name | Type | Description |
604
+ | --- | --- | --- |
605
+ | levelNum | <code>number</code> | The alert level number. |
606
+ | level | <code>string</code> | The alert level string (e.g., "red", "orange", "yellow"). |
607
+ | precipitation | <code>number</code> | The precipitation threshold for the alert level. |
608
+ | showers | <code>number</code> | The showers threshold for the alert level. |
609
+
610
+ <a name="module_utils..WindLevel"></a>
611
+
612
+ ### utils~WindLevel : <code>Object</code>
613
+ **Kind**: inner typedef of [<code>utils</code>](#module_utils)
614
+ **Properties**
615
+
616
+ | Name | Type | Description |
617
+ | --- | --- | --- |
618
+ | id | <code>number</code> | Level ID |
619
+ | speed | <code>number</code> | Minimum wind speed for this level |
620
+ | color | <code>string</code> | Color representing this level |
621
+ | tx | <code>string</code> | Text representing this level |
622
+ | txEn | <code>string</code> | Text representing this level |
623
+
624
+ <a name="module_utils"></a>
625
+
626
+ ## utils
627
+
628
+ * [utils](#module_utils)
629
+ * _static_
630
+ * [.degreesToCompass(degrees, language)](#module_utils.degreesToCompass) ⇒ <code>Object</code>
631
+ * [.getWarningByDays(precipitationSumToday, precipitationSumTomorrow, showersSumToday, showersSumTomorrow)](#module_utils.getWarningByDays) ⇒ <code>Object</code> \| <code>null</code>
632
+ * [.getWarning(precipitation, showers)](#module_utils.getWarning) ⇒ <code>Object</code> \| <code>null</code>
633
+ * [.windArrowTx(deg)](#module_utils.windArrowTx)
634
+ * [.getWindLevel(speed)](#module_utils.getWindLevel) ⇒ <code>WindLevel</code> \| <code>null</code>
635
+ * _inner_
636
+ * [~ALERT_LEVEL](#module_utils..ALERT_LEVEL) : <code>Array.&lt;AlertLevel&gt;</code>
637
+ * [~WIND_LEVELS](#module_utils..WIND_LEVELS) : <code>Array.&lt;WindLevel&gt;</code>
638
+ * [~getWarningRain(precipitation)](#module_utils..getWarningRain) ⇒ <code>Object</code> \| <code>null</code>
639
+ * [~getWarningShowers(showers)](#module_utils..getWarningShowers) ⇒ <code>Object</code> \| <code>null</code>
640
+ * [~AlertLevel](#module_utils..AlertLevel) : <code>Object</code>
641
+ * [~WindLevel](#module_utils..WindLevel) : <code>Object</code>
642
+
643
+ <a name="module_utils.degreesToCompass"></a>
644
+
645
+ ### utils.degreesToCompass(degrees, language) ⇒ <code>Object</code>
646
+ Convert degrees to compass designation
647
+
648
+ **Kind**: static method of [<code>utils</code>](#module_utils)
649
+
650
+ | Param | Type | Description |
651
+ | --- | --- | --- |
652
+ | degrees | <code>number</code> | |
653
+ | language | <code>string</code> | Language code ("en-US", "es-ES", "auto") |
654
+
655
+ <a name="module_utils.getWarningByDays"></a>
656
+
657
+ ### utils.getWarningByDays(precipitationSumToday, precipitationSumTomorrow, showersSumToday, showersSumTomorrow) ⇒ <code>Object</code> \| <code>null</code>
658
+ Get warning by today and tomorrow
659
+
660
+ **Kind**: static method of [<code>utils</code>](#module_utils)
661
+
662
+ | Param | Type |
663
+ | --- | --- |
664
+ | precipitationSumToday | <code>number</code> |
665
+ | precipitationSumTomorrow | <code>number</code> |
666
+ | showersSumToday | <code>number</code> |
667
+ | showersSumTomorrow | <code>number</code> |
668
+
669
+ <a name="module_utils.getWarning"></a>
670
+
671
+ ### utils.getWarning(precipitation, showers) ⇒ <code>Object</code> \| <code>null</code>
672
+ Get warning by precipitation and showers
673
+
674
+ **Kind**: static method of [<code>utils</code>](#module_utils)
675
+
676
+ | Param | Type |
677
+ | --- | --- |
678
+ | precipitation | <code>number</code> |
679
+ | showers | <code>number</code> |
680
+
681
+ <a name="module_utils.windArrowTx"></a>
682
+
683
+ ### utils.windArrowTx(deg)
684
+ Convert wind direction in degrees to an arrow representation.
685
+
686
+ **Kind**: static method of [<code>utils</code>](#module_utils)
687
+
688
+ | Param | Type | Description |
689
+ | --- | --- | --- |
690
+ | deg | <code>number</code> | Wind direction in degrees. |
691
+
692
+ <a name="module_utils.getWindLevel"></a>
693
+
694
+ ### utils.getWindLevel(speed) ⇒ <code>WindLevel</code> \| <code>null</code>
695
+ Return the wind level based on the speed.
696
+
697
+ **Kind**: static method of [<code>utils</code>](#module_utils)
698
+ **Returns**: <code>WindLevel</code> \| <code>null</code> - Wind level object or null if speed is null
699
+
700
+ | Param | Type | Description |
701
+ | --- | --- | --- |
702
+ | speed | <code>number</code> | Wind speed in km/h |
703
+
704
+ <a name="module_utils..ALERT_LEVEL"></a>
705
+
706
+ ### utils~ALERT\_LEVEL : <code>Array.&lt;AlertLevel&gt;</code>
707
+ Alert levels for rain and showers
708
+
709
+ **Kind**: inner constant of [<code>utils</code>](#module_utils)
710
+ <a name="module_utils..WIND_LEVELS"></a>
711
+
712
+ ### utils~WIND\_LEVELS : <code>Array.&lt;WindLevel&gt;</code>
713
+ Ordered list of wind levels.
714
+
715
+ **Kind**: inner constant of [<code>utils</code>](#module_utils)
716
+ <a name="module_utils..getWarningRain"></a>
717
+
718
+ ### utils~getWarningRain(precipitation) ⇒ <code>Object</code> \| <code>null</code>
719
+ Get warning by rain
720
+
721
+ **Kind**: inner method of [<code>utils</code>](#module_utils)
722
+
723
+ | Param | Type |
724
+ | --- | --- |
725
+ | precipitation | <code>number</code> |
726
+
727
+ <a name="module_utils..getWarningShowers"></a>
728
+
729
+ ### utils~getWarningShowers(showers) ⇒ <code>Object</code> \| <code>null</code>
730
+ Get warning by showers
731
+
732
+ **Kind**: inner method of [<code>utils</code>](#module_utils)
733
+
734
+ | Param | Type |
735
+ | --- | --- |
736
+ | showers | <code>number</code> |
737
+
738
+ <a name="module_utils..AlertLevel"></a>
739
+
740
+ ### utils~AlertLevel : <code>Object</code>
741
+ **Kind**: inner typedef of [<code>utils</code>](#module_utils)
742
+ **Properties**
743
+
744
+ | Name | Type | Description |
745
+ | --- | --- | --- |
746
+ | levelNum | <code>number</code> | The alert level number. |
747
+ | level | <code>string</code> | The alert level string (e.g., "red", "orange", "yellow"). |
748
+ | precipitation | <code>number</code> | The precipitation threshold for the alert level. |
749
+ | showers | <code>number</code> | The showers threshold for the alert level. |
750
+
751
+ <a name="module_utils..WindLevel"></a>
752
+
753
+ ### utils~WindLevel : <code>Object</code>
754
+ **Kind**: inner typedef of [<code>utils</code>](#module_utils)
755
+ **Properties**
756
+
757
+ | Name | Type | Description |
758
+ | --- | --- | --- |
759
+ | id | <code>number</code> | Level ID |
760
+ | speed | <code>number</code> | Minimum wind speed for this level |
761
+ | color | <code>string</code> | Color representing this level |
762
+ | tx | <code>string</code> | Text representing this level |
763
+ | txEn | <code>string</code> | Text representing this level |
764
+
765
+ <a name="module_utils"></a>
766
+
767
+ ## utils
768
+
769
+ * [utils](#module_utils)
770
+ * _static_
771
+ * [.degreesToCompass(degrees, language)](#module_utils.degreesToCompass) ⇒ <code>Object</code>
772
+ * [.getWarningByDays(precipitationSumToday, precipitationSumTomorrow, showersSumToday, showersSumTomorrow)](#module_utils.getWarningByDays) ⇒ <code>Object</code> \| <code>null</code>
773
+ * [.getWarning(precipitation, showers)](#module_utils.getWarning) ⇒ <code>Object</code> \| <code>null</code>
774
+ * [.windArrowTx(deg)](#module_utils.windArrowTx)
775
+ * [.getWindLevel(speed)](#module_utils.getWindLevel) ⇒ <code>WindLevel</code> \| <code>null</code>
776
+ * _inner_
777
+ * [~ALERT_LEVEL](#module_utils..ALERT_LEVEL) : <code>Array.&lt;AlertLevel&gt;</code>
778
+ * [~WIND_LEVELS](#module_utils..WIND_LEVELS) : <code>Array.&lt;WindLevel&gt;</code>
779
+ * [~getWarningRain(precipitation)](#module_utils..getWarningRain) ⇒ <code>Object</code> \| <code>null</code>
780
+ * [~getWarningShowers(showers)](#module_utils..getWarningShowers) ⇒ <code>Object</code> \| <code>null</code>
781
+ * [~AlertLevel](#module_utils..AlertLevel) : <code>Object</code>
782
+ * [~WindLevel](#module_utils..WindLevel) : <code>Object</code>
783
+
784
+ <a name="module_utils.degreesToCompass"></a>
785
+
786
+ ### utils.degreesToCompass(degrees, language) ⇒ <code>Object</code>
787
+ Convert degrees to compass designation
788
+
789
+ **Kind**: static method of [<code>utils</code>](#module_utils)
790
+
791
+ | Param | Type | Description |
792
+ | --- | --- | --- |
793
+ | degrees | <code>number</code> | |
794
+ | language | <code>string</code> | Language code ("en-US", "es-ES", "auto") |
795
+
796
+ <a name="module_utils.getWarningByDays"></a>
797
+
798
+ ### utils.getWarningByDays(precipitationSumToday, precipitationSumTomorrow, showersSumToday, showersSumTomorrow) ⇒ <code>Object</code> \| <code>null</code>
799
+ Get warning by today and tomorrow
800
+
801
+ **Kind**: static method of [<code>utils</code>](#module_utils)
802
+
803
+ | Param | Type |
804
+ | --- | --- |
805
+ | precipitationSumToday | <code>number</code> |
806
+ | precipitationSumTomorrow | <code>number</code> |
807
+ | showersSumToday | <code>number</code> |
808
+ | showersSumTomorrow | <code>number</code> |
809
+
810
+ <a name="module_utils.getWarning"></a>
811
+
812
+ ### utils.getWarning(precipitation, showers) ⇒ <code>Object</code> \| <code>null</code>
813
+ Get warning by precipitation and showers
814
+
815
+ **Kind**: static method of [<code>utils</code>](#module_utils)
816
+
817
+ | Param | Type |
818
+ | --- | --- |
819
+ | precipitation | <code>number</code> |
820
+ | showers | <code>number</code> |
821
+
822
+ <a name="module_utils.windArrowTx"></a>
823
+
824
+ ### utils.windArrowTx(deg)
825
+ Convert wind direction in degrees to an arrow representation.
826
+
827
+ **Kind**: static method of [<code>utils</code>](#module_utils)
828
+
829
+ | Param | Type | Description |
830
+ | --- | --- | --- |
831
+ | deg | <code>number</code> | Wind direction in degrees. |
832
+
833
+ <a name="module_utils.getWindLevel"></a>
834
+
835
+ ### utils.getWindLevel(speed) ⇒ <code>WindLevel</code> \| <code>null</code>
836
+ Return the wind level based on the speed.
837
+
838
+ **Kind**: static method of [<code>utils</code>](#module_utils)
839
+ **Returns**: <code>WindLevel</code> \| <code>null</code> - Wind level object or null if speed is null
840
+
841
+ | Param | Type | Description |
842
+ | --- | --- | --- |
843
+ | speed | <code>number</code> | Wind speed in km/h |
844
+
845
+ <a name="module_utils..ALERT_LEVEL"></a>
846
+
847
+ ### utils~ALERT\_LEVEL : <code>Array.&lt;AlertLevel&gt;</code>
848
+ Alert levels for rain and showers
849
+
850
+ **Kind**: inner constant of [<code>utils</code>](#module_utils)
851
+ <a name="module_utils..WIND_LEVELS"></a>
852
+
853
+ ### utils~WIND\_LEVELS : <code>Array.&lt;WindLevel&gt;</code>
854
+ Ordered list of wind levels.
855
+
856
+ **Kind**: inner constant of [<code>utils</code>](#module_utils)
857
+ <a name="module_utils..getWarningRain"></a>
858
+
859
+ ### utils~getWarningRain(precipitation) ⇒ <code>Object</code> \| <code>null</code>
860
+ Get warning by rain
861
+
862
+ **Kind**: inner method of [<code>utils</code>](#module_utils)
863
+
864
+ | Param | Type |
865
+ | --- | --- |
866
+ | precipitation | <code>number</code> |
867
+
868
+ <a name="module_utils..getWarningShowers"></a>
869
+
870
+ ### utils~getWarningShowers(showers) ⇒ <code>Object</code> \| <code>null</code>
871
+ Get warning by showers
872
+
873
+ **Kind**: inner method of [<code>utils</code>](#module_utils)
874
+
875
+ | Param | Type |
876
+ | --- | --- |
877
+ | showers | <code>number</code> |
878
+
879
+ <a name="module_utils..AlertLevel"></a>
880
+
881
+ ### utils~AlertLevel : <code>Object</code>
882
+ **Kind**: inner typedef of [<code>utils</code>](#module_utils)
883
+ **Properties**
884
+
885
+ | Name | Type | Description |
886
+ | --- | --- | --- |
887
+ | levelNum | <code>number</code> | The alert level number. |
888
+ | level | <code>string</code> | The alert level string (e.g., "red", "orange", "yellow"). |
889
+ | precipitation | <code>number</code> | The precipitation threshold for the alert level. |
890
+ | showers | <code>number</code> | The showers threshold for the alert level. |
891
+
892
+ <a name="module_utils..WindLevel"></a>
893
+
894
+ ### utils~WindLevel : <code>Object</code>
895
+ **Kind**: inner typedef of [<code>utils</code>](#module_utils)
896
+ **Properties**
897
+
898
+ | Name | Type | Description |
899
+ | --- | --- | --- |
900
+ | id | <code>number</code> | Level ID |
901
+ | speed | <code>number</code> | Minimum wind speed for this level |
902
+ | color | <code>string</code> | Color representing this level |
903
+ | tx | <code>string</code> | Text representing this level |
904
+ | txEn | <code>string</code> | Text representing this level |
905
+
906
+ <a name="module_utils"></a>
907
+
908
+ ## utils
909
+
910
+ * [utils](#module_utils)
911
+ * _static_
912
+ * [.degreesToCompass(degrees, language)](#module_utils.degreesToCompass) ⇒ <code>Object</code>
913
+ * [.getWarningByDays(precipitationSumToday, precipitationSumTomorrow, showersSumToday, showersSumTomorrow)](#module_utils.getWarningByDays) ⇒ <code>Object</code> \| <code>null</code>
914
+ * [.getWarning(precipitation, showers)](#module_utils.getWarning) ⇒ <code>Object</code> \| <code>null</code>
915
+ * [.windArrowTx(deg)](#module_utils.windArrowTx)
916
+ * [.getWindLevel(speed)](#module_utils.getWindLevel) ⇒ <code>WindLevel</code> \| <code>null</code>
917
+ * _inner_
918
+ * [~ALERT_LEVEL](#module_utils..ALERT_LEVEL) : <code>Array.&lt;AlertLevel&gt;</code>
919
+ * [~WIND_LEVELS](#module_utils..WIND_LEVELS) : <code>Array.&lt;WindLevel&gt;</code>
920
+ * [~getWarningRain(precipitation)](#module_utils..getWarningRain) ⇒ <code>Object</code> \| <code>null</code>
921
+ * [~getWarningShowers(showers)](#module_utils..getWarningShowers) ⇒ <code>Object</code> \| <code>null</code>
922
+ * [~AlertLevel](#module_utils..AlertLevel) : <code>Object</code>
923
+ * [~WindLevel](#module_utils..WindLevel) : <code>Object</code>
924
+
925
+ <a name="module_utils.degreesToCompass"></a>
926
+
927
+ ### utils.degreesToCompass(degrees, language) ⇒ <code>Object</code>
928
+ Convert degrees to compass designation
929
+
930
+ **Kind**: static method of [<code>utils</code>](#module_utils)
931
+
932
+ | Param | Type | Description |
933
+ | --- | --- | --- |
934
+ | degrees | <code>number</code> | |
935
+ | language | <code>string</code> | Language code ("en-US", "es-ES", "auto") |
936
+
937
+ <a name="module_utils.getWarningByDays"></a>
938
+
939
+ ### utils.getWarningByDays(precipitationSumToday, precipitationSumTomorrow, showersSumToday, showersSumTomorrow) ⇒ <code>Object</code> \| <code>null</code>
940
+ Get warning by today and tomorrow
941
+
942
+ **Kind**: static method of [<code>utils</code>](#module_utils)
943
+
944
+ | Param | Type |
945
+ | --- | --- |
946
+ | precipitationSumToday | <code>number</code> |
947
+ | precipitationSumTomorrow | <code>number</code> |
948
+ | showersSumToday | <code>number</code> |
949
+ | showersSumTomorrow | <code>number</code> |
950
+
951
+ <a name="module_utils.getWarning"></a>
952
+
953
+ ### utils.getWarning(precipitation, showers) ⇒ <code>Object</code> \| <code>null</code>
954
+ Get warning by precipitation and showers
955
+
956
+ **Kind**: static method of [<code>utils</code>](#module_utils)
957
+
958
+ | Param | Type |
959
+ | --- | --- |
960
+ | precipitation | <code>number</code> |
961
+ | showers | <code>number</code> |
962
+
963
+ <a name="module_utils.windArrowTx"></a>
964
+
965
+ ### utils.windArrowTx(deg)
966
+ Convert wind direction in degrees to an arrow representation.
967
+
968
+ **Kind**: static method of [<code>utils</code>](#module_utils)
969
+
970
+ | Param | Type | Description |
971
+ | --- | --- | --- |
972
+ | deg | <code>number</code> | Wind direction in degrees. |
973
+
974
+ <a name="module_utils.getWindLevel"></a>
975
+
976
+ ### utils.getWindLevel(speed) ⇒ <code>WindLevel</code> \| <code>null</code>
977
+ Return the wind level based on the speed.
978
+
979
+ **Kind**: static method of [<code>utils</code>](#module_utils)
980
+ **Returns**: <code>WindLevel</code> \| <code>null</code> - Wind level object or null if speed is null
981
+
982
+ | Param | Type | Description |
983
+ | --- | --- | --- |
984
+ | speed | <code>number</code> | Wind speed in km/h |
985
+
986
+ <a name="module_utils..ALERT_LEVEL"></a>
987
+
988
+ ### utils~ALERT\_LEVEL : <code>Array.&lt;AlertLevel&gt;</code>
989
+ Alert levels for rain and showers
990
+
991
+ **Kind**: inner constant of [<code>utils</code>](#module_utils)
992
+ <a name="module_utils..WIND_LEVELS"></a>
993
+
994
+ ### utils~WIND\_LEVELS : <code>Array.&lt;WindLevel&gt;</code>
995
+ Ordered list of wind levels.
996
+
997
+ **Kind**: inner constant of [<code>utils</code>](#module_utils)
998
+ <a name="module_utils..getWarningRain"></a>
999
+
1000
+ ### utils~getWarningRain(precipitation) ⇒ <code>Object</code> \| <code>null</code>
1001
+ Get warning by rain
1002
+
1003
+ **Kind**: inner method of [<code>utils</code>](#module_utils)
1004
+
1005
+ | Param | Type |
1006
+ | --- | --- |
1007
+ | precipitation | <code>number</code> |
1008
+
1009
+ <a name="module_utils..getWarningShowers"></a>
1010
+
1011
+ ### utils~getWarningShowers(showers) ⇒ <code>Object</code> \| <code>null</code>
1012
+ Get warning by showers
1013
+
1014
+ **Kind**: inner method of [<code>utils</code>](#module_utils)
1015
+
1016
+ | Param | Type |
1017
+ | --- | --- |
1018
+ | showers | <code>number</code> |
1019
+
1020
+ <a name="module_utils..AlertLevel"></a>
1021
+
1022
+ ### utils~AlertLevel : <code>Object</code>
1023
+ **Kind**: inner typedef of [<code>utils</code>](#module_utils)
1024
+ **Properties**
1025
+
1026
+ | Name | Type | Description |
1027
+ | --- | --- | --- |
1028
+ | levelNum | <code>number</code> | The alert level number. |
1029
+ | level | <code>string</code> | The alert level string (e.g., "red", "orange", "yellow"). |
1030
+ | precipitation | <code>number</code> | The precipitation threshold for the alert level. |
1031
+ | showers | <code>number</code> | The showers threshold for the alert level. |
1032
+
1033
+ <a name="module_utils..WindLevel"></a>
1034
+
1035
+ ### utils~WindLevel : <code>Object</code>
1036
+ **Kind**: inner typedef of [<code>utils</code>](#module_utils)
1037
+ **Properties**
1038
+
1039
+ | Name | Type | Description |
1040
+ | --- | --- | --- |
1041
+ | id | <code>number</code> | Level ID |
1042
+ | speed | <code>number</code> | Minimum wind speed for this level |
1043
+ | color | <code>string</code> | Color representing this level |
1044
+ | tx | <code>string</code> | Text representing this level |
1045
+ | txEn | <code>string</code> | Text representing this level |
1046
+