by ghayes · 6mo ago · 0 comments
Object.values(zipBuckets).forEach(function(b) {
var latest = b.reports.map(function(r){return r.date;}).sort().reverse()[0];
// ...
var popup =
'<div style="font-family: Inter, sans-serif; min-width:220px; max-width:280px;">' +
(noteLines ? '<ul style="font-size:12px; color:#3a4a2a; padding-left:16px; margin:0;">' + noteLines + '</ul>' : '') +
// ...
}
Certain ergonomics are hard to miss since a human who writes heavy FP would opt for a `(r) => r.date` lambda, where the computer has no problem writing out inline `function(r)`-style declarations. Similarly, the HTML mapping function could go either way, but mixing in large sets of text with hard constants would be really uncommon for humans to write.JavaScript is always a mess, but it's a _different_ mess between humans and AI, and this function `loadCommunityReports` really reads AI-first to me.