Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

refactor(oss): use poor man's arr.flat()

Bobbie Soedirgo44abd8c5cd83
diff --git a/web/traction.js b/web/traction.js
index ead3c99acad..b06e646cb6f 100644
--- a/web/traction.js
+++ b/web/traction.js
@@ -45,7 +45,9 @@ const main = async () => {
.map(async ([name, stars]) => [name, await fetchAllEvents(name, stars)])
)
- const history = repos.map(([name, githubResponse]) => formatResults(name, githubResponse)).flat()
+ const history = repos
+ .map(([name, githubResponse]) => formatResults(name, githubResponse))
+ .reduce((acc, x) => acc.concat(x), [])
const groups = history.reduce((groups, event) => {
const date = event.starred_at.split('T')[0]