UNPKG

@scalar/api-client

Version:

the open source API testing client

11 lines (10 loc) 155 B
const s = (u, n, r) => u.reduce( (t, e) => { const p = r ? r(e) : e; return (t[e[n]] ??= []).push(p), t; }, {} ); export { s as groupBy };