Changes as per PR -Created files for transformer queries - tests updated accordingly -Updates for Env variables and usage -Changes surrounding App Rename testing
11 lines
No EOL
303 B
JavaScript
11 lines
No EOL
303 B
JavaScript
const breweries = data
|
|
const totals = {}
|
|
|
|
for (let brewery of breweries)
|
|
{const state = brewery.state
|
|
if (totals[state] == null)
|
|
{totals[state] = 1}
|
|
else
|
|
{totals[state]++}}
|
|
const entries = Object.entries(totals)
|
|
return entries.map(([state, count]) => ({state, count})) |