@aguacerowx/javascript-sdk 0.0.28 → 0.0.29

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.
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getUnitConversionFunction = getUnitConversionFunction;
7
7
  exports.unitConversions = void 0;
8
- /**
9
- * A utility module for converting between different physical units.
10
- * Contains a comprehensive object of conversion functions and a helper
11
- * to retrieve the correct function based on unit names.
8
+ /**
9
+ * A utility module for converting between different physical units.
10
+ * Contains a comprehensive object of conversion functions and a helper
11
+ * to retrieve the correct function based on unit names.
12
12
  */
13
13
 
14
14
  // The main object containing all the raw conversion functions.
@@ -68,12 +68,12 @@ const unitConversions = exports.unitConversions = {
68
68
  cm_hr_to_mm_hr: data => data * 10
69
69
  };
70
70
 
71
- /**
72
- * Finds and returns the correct conversion function based on "from" and "to" unit strings.
73
- * It normalizes common unit abbreviations to a consistent key.
74
- * @param {string} fromUnit - The starting unit (e.g., 'kelvin', '°C', 'kts').
75
- * @param {string} toUnit - The target unit (e.g., 'fahrenheit', '°F', 'mph').
76
- * @returns {function(number): number | null} The conversion function, or null if not found.
71
+ /**
72
+ * Finds and returns the correct conversion function based on "from" and "to" unit strings.
73
+ * It normalizes common unit abbreviations to a consistent key.
74
+ * @param {string} fromUnit - The starting unit (e.g., 'kelvin', '°C', 'kts').
75
+ * @param {string} toUnit - The target unit (e.g., 'fahrenheit', '°F', 'mph').
76
+ * @returns {function(number): number | null} The conversion function, or null if not found.
77
77
  */
78
78
  function getUnitConversionFunction(fromUnit, toUnit) {
79
79
  // A map to standardize various unit string formats to a single key format.
package/package.json CHANGED
@@ -1,99 +1,99 @@
1
- {
2
- "name": "@aguacerowx/javascript-sdk",
3
- "version": "0.0.28",
4
- "type": "module",
5
- "private": false,
6
- "publishConfig": {
7
- "access": "public"
8
- },
9
- "description": "Core SDK for fetching and processing Aguacero weather data.",
10
- "main": "src/index.js",
11
- "module": "src/index.js",
12
- "react-native": "src/index.js",
13
- "exports": {
14
- ".": {
15
- "import": "./src/index.js",
16
- "require": "./src/index.js",
17
- "react-native": "./src/index.js",
18
- "default": "./src/index.js"
19
- },
20
- "./nexradTilts.js": {
21
- "import": "./src/nexradTilts.js",
22
- "require": "./src/nexradTilts.js",
23
- "default": "./src/nexradTilts.js"
24
- },
25
- "./nexrad_support.js": {
26
- "import": "./src/nexrad_support.js",
27
- "require": "./src/nexrad_support.js",
28
- "default": "./src/nexrad_support.js"
29
- },
30
- "./nexradTiltCoalesce.js": {
31
- "import": "./src/nexradTiltCoalesce.js",
32
- "require": "./src/nexradTiltCoalesce.js",
33
- "default": "./src/nexradTiltCoalesce.js"
34
- },
35
- "./satellite_support.js": {
36
- "import": "./src/satellite_support.js",
37
- "require": "./src/satellite_support.js",
38
- "react-native": "./src/satellite_support.js",
39
- "default": "./src/satellite_support.js"
40
- },
41
- "./nws/NwsWatchesWarningsOverlay.js": {
42
- "import": "./src/nws/NwsWatchesWarningsOverlay.js",
43
- "require": "./src/nws/NwsWatchesWarningsOverlay.js",
44
- "react-native": "./src/nws/NwsWatchesWarningsOverlay.js",
45
- "default": "./src/nws/NwsWatchesWarningsOverlay.js"
46
- },
47
- "./nws/nwsSdkConstants.js": {
48
- "import": "./src/nws/nwsSdkConstants.js",
49
- "require": "./src/nws/nwsSdkConstants.js",
50
- "react-native": "./src/nws/nwsSdkConstants.js",
51
- "default": "./src/nws/nwsSdkConstants.js"
52
- },
53
- "./nws/nwsAlertsSupport.js": {
54
- "import": "./src/nws/nwsAlertsSupport.js",
55
- "require": "./src/nws/nwsAlertsSupport.js",
56
- "react-native": "./src/nws/nwsAlertsSupport.js",
57
- "default": "./src/nws/nwsAlertsSupport.js"
58
- },
59
- "./nws/nwsAlertsFetchSpec.js": {
60
- "import": "./src/nws/nwsAlertsFetchSpec.js",
61
- "require": "./src/nws/nwsAlertsFetchSpec.js",
62
- "react-native": "./src/nws/nwsAlertsFetchSpec.js",
63
- "default": "./src/nws/nwsAlertsFetchSpec.js"
64
- }
65
- },
66
- "files": [
67
- "dist",
68
- "src"
69
- ],
70
- "scripts": {
71
- "build": "babel src -d dist --config-file ./babel.build.config.js",
72
- "gen:nws-key": "esbuild ../../../aguacero-frontend/src/components/WarningsMenu/nwsWarningCustomizationKey.ts --bundle --format=esm --platform=neutral --outfile=src/nws/nwsWarningCustomizationKey.gen.js"
73
- },
74
- "author": "Your Name",
75
- "license": "MIT",
76
- "devDependencies": {
77
- "esbuild": "^0.21.5"
78
- },
79
- "dependencies": {
80
- "proj4": "^2.11.0",
81
- "fzstd": "^0.1.1"
82
- },
83
- "peerDependencies": {
84
- "react": "*",
85
- "react-native": "*",
86
- "react-native-device-info": ">=10.0.0"
87
- },
88
- "peerDependenciesMeta": {
89
- "react": {
90
- "optional": true
91
- },
92
- "react-native": {
93
- "optional": true
94
- },
95
- "react-native-device-info": {
96
- "optional": true
97
- }
98
- }
99
- }
1
+ {
2
+ "name": "@aguacerowx/javascript-sdk",
3
+ "version": "0.0.29",
4
+ "type": "module",
5
+ "private": false,
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "description": "Core SDK for fetching and processing Aguacero weather data.",
10
+ "main": "src/index.js",
11
+ "module": "src/index.js",
12
+ "react-native": "src/index.js",
13
+ "exports": {
14
+ ".": {
15
+ "import": "./src/index.js",
16
+ "require": "./src/index.js",
17
+ "react-native": "./src/index.js",
18
+ "default": "./src/index.js"
19
+ },
20
+ "./nexradTilts.js": {
21
+ "import": "./src/nexradTilts.js",
22
+ "require": "./src/nexradTilts.js",
23
+ "default": "./src/nexradTilts.js"
24
+ },
25
+ "./nexrad_support.js": {
26
+ "import": "./src/nexrad_support.js",
27
+ "require": "./src/nexrad_support.js",
28
+ "default": "./src/nexrad_support.js"
29
+ },
30
+ "./nexradTiltCoalesce.js": {
31
+ "import": "./src/nexradTiltCoalesce.js",
32
+ "require": "./src/nexradTiltCoalesce.js",
33
+ "default": "./src/nexradTiltCoalesce.js"
34
+ },
35
+ "./satellite_support.js": {
36
+ "import": "./src/satellite_support.js",
37
+ "require": "./src/satellite_support.js",
38
+ "react-native": "./src/satellite_support.js",
39
+ "default": "./src/satellite_support.js"
40
+ },
41
+ "./nws/NwsWatchesWarningsOverlay.js": {
42
+ "import": "./src/nws/NwsWatchesWarningsOverlay.js",
43
+ "require": "./src/nws/NwsWatchesWarningsOverlay.js",
44
+ "react-native": "./src/nws/NwsWatchesWarningsOverlay.js",
45
+ "default": "./src/nws/NwsWatchesWarningsOverlay.js"
46
+ },
47
+ "./nws/nwsSdkConstants.js": {
48
+ "import": "./src/nws/nwsSdkConstants.js",
49
+ "require": "./src/nws/nwsSdkConstants.js",
50
+ "react-native": "./src/nws/nwsSdkConstants.js",
51
+ "default": "./src/nws/nwsSdkConstants.js"
52
+ },
53
+ "./nws/nwsAlertsSupport.js": {
54
+ "import": "./src/nws/nwsAlertsSupport.js",
55
+ "require": "./src/nws/nwsAlertsSupport.js",
56
+ "react-native": "./src/nws/nwsAlertsSupport.js",
57
+ "default": "./src/nws/nwsAlertsSupport.js"
58
+ },
59
+ "./nws/nwsAlertsFetchSpec.js": {
60
+ "import": "./src/nws/nwsAlertsFetchSpec.js",
61
+ "require": "./src/nws/nwsAlertsFetchSpec.js",
62
+ "react-native": "./src/nws/nwsAlertsFetchSpec.js",
63
+ "default": "./src/nws/nwsAlertsFetchSpec.js"
64
+ }
65
+ },
66
+ "files": [
67
+ "dist",
68
+ "src"
69
+ ],
70
+ "scripts": {
71
+ "build": "babel src -d dist --config-file ./babel.build.config.js",
72
+ "gen:nws-key": "esbuild ../../../aguacero-frontend/src/components/WarningsMenu/nwsWarningCustomizationKey.ts --bundle --format=esm --platform=neutral --outfile=src/nws/nwsWarningCustomizationKey.gen.js"
73
+ },
74
+ "author": "Your Name",
75
+ "license": "MIT",
76
+ "devDependencies": {
77
+ "esbuild": "^0.21.5"
78
+ },
79
+ "dependencies": {
80
+ "proj4": "^2.11.0",
81
+ "fzstd": "^0.1.1"
82
+ },
83
+ "peerDependencies": {
84
+ "react": "*",
85
+ "react-native": "*",
86
+ "react-native-device-info": ">=10.0.0"
87
+ },
88
+ "peerDependenciesMeta": {
89
+ "react": {
90
+ "optional": true
91
+ },
92
+ "react-native": {
93
+ "optional": true
94
+ },
95
+ "react-native-device-info": {
96
+ "optional": true
97
+ }
98
+ }
99
+ }