@justair/justair-library 7.10.0-alpha.ceed281 → 7.10.0-alpha.f42db94

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/README.md CHANGED
@@ -121,31 +121,6 @@ Same install-time visibility caveat as the 7.4.0 section above.
121
121
 
122
122
  `HI` is **derived, not measured**. Processing-Engine computes it from that reading's own `T_AMB` / `RH_AMB` pair using the NOAA formula (JA-3120); no supplier reports it. It takes no `_AMB` suffix because there is no internal counterpart — an enclosure Heat Index would describe the inside of the housing. Never compute it from the bare `T` / `RH`.
123
123
 
124
- ### New parameter and type changes in 7.10.0
125
-
126
- | id | Name | Unit |
127
- |---|---|---|
128
- | `RN` | Radon | `pCi/L` |
129
-
130
- Same install-time visibility caveat as the 7.4.0 section above. Nothing normalizes radon today, so no
131
- monitor carries it yet, but the first one that does will surface publicly. JA-3427 records that radon
132
- should start admin only; that gating lives only in JustAir-Client's `parameterFiltering.js` and V2 has
133
- no equivalent.
134
-
135
- `RN.rfc` is `4`, the EPA indoor action level in pCi/L. It is **not** an IRIS chronic inhalation RfC in
136
- µg/m³, which is what every `HEAVY_METALS` `rfc` is. Nothing reads `rfc` off `PARAMETERS` today.
137
-
138
- Two `type` values also changed, so a service that groups by `type` will show these in a new group
139
- after install:
140
-
141
- | id | Was | Now |
142
- |---|---|---|
143
- | `H2S` | `Volatile Organic Compound` | `Gas` |
144
- | `CH4` | `Volatile Organic Compound` | `Gas` |
145
-
146
- `origin` and `impacts` were also filled in for the non-AQI pollutants that had them blank. Display
147
- only, no shape change.
148
-
149
124
  ### Object shape
150
125
 
151
126
  Each constant is an object with the following fields:
@@ -157,7 +132,7 @@ Each constant is an object with the following fields:
157
132
  | `name` | `string` | Full descriptive name (e.g. `"Particulate Matter 2.5 (PM₂.₅)"`) |
158
133
  | `unit` | `string` | Measurement unit (e.g. `"µg/m³"`) |
159
134
  | `type` | `string` | Category: `"Particulate Matter"`, `"Gas"`, `"Volatile Organic Compound"`, `"Weather"`, `"Heavy Metal"`, `"Heavy Metal - Essential Nutrient"` |
160
- | `rfc` | `number \| null` | EPA IRIS chronic inhalation reference concentration (µg/m³). Exception: `RN.rfc` is the EPA indoor action level in pCi/L |
135
+ | `rfc` | `number \| null` | EPA IRIS chronic inhalation reference concentration (µg/m³) |
161
136
  | `origin` | `string \| null` | Description of pollution source |
162
137
  | `impacts` | `string \| null` | Human health impact description |
163
138
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justair/justair-library",
3
- "version": "7.10.0-alpha.ceed281",
3
+ "version": "7.10.0-alpha.f42db94",
4
4
  "description": "JustAir Internal Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -101,7 +101,7 @@ export const PARAMETERS = {
101
101
  unit: "ppm",
102
102
  type: "Gas",
103
103
  rfc: null,
104
- origin: "Found naturally in crude oil, natural gas, and volcanic gas. Also released by oil refineries, wastewater plants, farms with livestock, and landfills. Smells like rotten eggs.",
104
+ origin: "Found naturally in crude oil, natural gas, and volcanic gas. Also released by oil refineries, wastewater plants, farms with livestock, and landfills. Smells of rotten-eggs.",
105
105
  impacts: "Low levels over a long time can irritate eyes and airways and cause headaches or nausea. Very high levels can cause someone to pass out or die.",
106
106
  },
107
107
  CH4: {
@@ -130,7 +130,7 @@ export const PARAMETERS = {
130
130
  name: "Radon (Rn)",
131
131
  unit: "pCi/L",
132
132
  type: "Gas",
133
- rfc: 4, // EPA indoor action level (pCi/L), not an IRIS inhalation RfC like the HEAVY_METALS values
133
+ rfc: 4, // doc states ">= 4pCi/L"; rfc is numeric, so the threshold value only
134
134
  origin: "A radioactive gas that comes naturally from uranium breaking down in rock, soil, and water. It can leak into buildings through cracks in the foundation. Has no color or smell.",
135
135
  impacts: "The second leading cause of lung cancer in the US, after smoking. Linked to about 21,000 lung cancer deaths a year.",
136
136
  },
@@ -1,17 +1,11 @@
1
1
  import { PARAMETERS, HEAVY_METALS } from "../pollutants.js";
2
2
 
3
3
  const REQUIRED_FIELDS = ["id", "label", "name", "unit", "type"];
4
-
5
- // The one type that is not a pollutant. Stated, not derived: deriving the exemption from the
6
- // entries would make the origin/impacts test assert nothing, since a new entry shipped blank
7
- // would exempt itself.
8
- const WEATHER_TYPE = "Weather";
9
-
10
4
  const VALID_TYPES = [
11
5
  "Particulate Matter",
12
6
  "Gas",
13
7
  "Volatile Organic Compound",
14
- WEATHER_TYPE,
8
+ "Weather",
15
9
  "Heavy Metal",
16
10
  "Heavy Metal - Essential Nutrient",
17
11
  ];
@@ -76,7 +70,7 @@ function sharedAssertions(constants) {
76
70
  // JA-3460: every pollutant needs Origin and Impacts copy. Weather parameters are exempt: they
77
71
  // are not pollutants, and the Centralized Constants doc leaves both columns blank for them.
78
72
  function hasOriginAndImpacts(constants) {
79
- const pollutants = Object.entries(constants).filter(([, p]) => p.type !== WEATHER_TYPE);
73
+ const pollutants = Object.entries(constants).filter(([, p]) => p.type !== "Weather");
80
74
 
81
75
  test.each(pollutants)("%s: origin is populated", (key, pollutant) => {
82
76
  expect(typeof pollutant.origin).toBe("string");
@@ -113,7 +107,7 @@ describe("PARAMETERS", () => {
113
107
  test("is declared as a Weather parameter in °F", () => {
114
108
  expect(PARAMETERS.HI).toBeDefined();
115
109
  expect(PARAMETERS.HI.unit).toBe("°F");
116
- expect(PARAMETERS.HI.type).toBe(WEATHER_TYPE);
110
+ expect(PARAMETERS.HI.type).toBe("Weather");
117
111
  });
118
112
 
119
113
  test("shares T_AMB's unit, since it is an apparent temperature", () => {