@aguacerowx/javascript-sdk 0.0.14 → 0.0.15

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aguacerowx/javascript-sdk",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -570,30 +570,6 @@ export class AguaceroCore extends EventEmitter {
570
570
  const conversionFunc = getUnitConversionFunction(dataNativeUnit, displayUnit);
571
571
  let displayValue = conversionFunc ? conversionFunc(nativeValue) : nativeValue;
572
572
 
573
- // --- START: ADDED CODE ---
574
-
575
- // Create a variable to hold the precipitation type, if any.
576
- let precipType = null;
577
-
578
- // Check if the current variable is one of the special ptype variables.
579
- if (variable === 'ptypeRefl' || variable === 'ptypeRate') {
580
- const value = nativeValue; // Use the raw, unconverted value for ptype logic
581
-
582
- if (value >= 100 && value < 200) {
583
- displayValue -= 100;
584
- precipType = 'Snow';
585
- } else if (value >= 200 && value < 300) {
586
- displayValue -= 200;
587
- precipType = 'Frzg Rain'; // Abbreviated for tooltips
588
- } else if (value >= 300 && value < 400) {
589
- displayValue -= 300;
590
- precipType = 'Ice Pellets';
591
- } else {
592
- precipType = 'Rain';
593
- }
594
- }
595
-
596
- // Return the final payload, now including the precipType.
597
573
  return {
598
574
  lngLat: { lng, lat },
599
575
  variable: {
@@ -602,7 +578,6 @@ export class AguaceroCore extends EventEmitter {
602
578
  },
603
579
  value: displayValue,
604
580
  unit: displayUnit,
605
- precipType: precipType // NEW: Add this to the return object
606
581
  };
607
582
  } catch (error) {
608
583
  return null;