Skip to content

Commit

Permalink
Apply prettier fixes 🤖
Browse files Browse the repository at this point in the history
  • Loading branch information
skalnik authored and actions-user committed Oct 21, 2020
1 parent 6261fc8 commit 03e5090
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,10 @@
if (!bustedSensor(subsensor)) {
pm25s.push(parseFloat(subsensor["pm2_5_cf_1"]));
}

}
const pm25 = pm25s.reduce((a, b) => a + b) / pm25s.length;
const aqi = epaAQIFromPMandHumidity(pm25,humidity);
const aqi = epaAQIFromPMandHumidity(pm25, humidity);

const distance = Math.round(closestSensor.distance * 10) / 10;
const time = new Date().toLocaleTimeString();
const paLink = getPurpleAirLink();
Expand Down Expand Up @@ -259,9 +258,8 @@
}

function epaAQIFromPMandHumidity(pm, humidity) {
return aqiFromPM((0.534*pm) - (0.0844*humidity) + 5.604);
return aqiFromPM(0.534 * pm - 0.0844 * humidity + 5.604);
}


function aqiFromPM(pm) {
if (isNaN(pm)) return "-";
Expand Down

1 comment on commit 03e5090

@vercel
Copy link

@vercel vercel bot commented on 03e5090 Oct 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.