You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.log(weather.conditions.value); // Standardized value (e.g., "Clear")
295
+
console.log(weather.conditions.original); // Original provider text (e.g., "clear sky")
296
+
```
297
+
298
+
For OpenWeather, the standardization is based on the API's Weather Condition ID codes as documented at [OpenWeather Weather Conditions](https://openweathermap.org/weather-conditions).
299
+
300
+
This allows you to display either the original detailed condition from the provider or use the standardized value for consistent UI elements or logic across your application.
301
+
234
302
### TypeScript Support
235
303
236
304
This library is built with TypeScript and includes type-safe interfaces for weather data and errors.
@@ -253,8 +321,9 @@ interface IWeatherData {
253
321
unit:string;
254
322
};
255
323
conditions: {
256
-
value:string;
257
-
unit:string;
324
+
value:string; // Standardized condition across providers
325
+
unit:string; // Always "string"
326
+
original:string; // Original provider condition text
0 commit comments