UNPKG
nba
Version:
latest (4.15.0)
4.15.0
4.14.0
4.13.0
4.12.0
4.11.1
4.11.0
4.10.2
4.10.1
4.10.0
4.9.0
4.8.0
4.7.0
4.6.0
4.5.0
4.4.0
4.3.2
4.3.1
4.3.0
4.2.2
4.2.1
4.2.0
4.1.0
4.0.1
4.0.0
3.7.0
3.5.1
3.2.6
3.2.4
3.2.3
3.2.1
3.2.0
3.1.1
3.0.0
2.0.1
2.0.0
1.2.0
1.0.1
1.0.0
0.4.1
0.4.0
0.3.0
0.2.0
0.1.0
JavaScript client for the NBA's stats API
github.com/bttmly/nba
bttmly/nba
nba
/
src
/
util
/
collectify.js
8 lines
•
207 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
module
.
exports
=
function
collectify
(
headers, rows
) {
return
rows.
map
(
function
(
row
) {
return
row.
reduce
(
function
(
cell, val, i
) { cell[headers[i]] = val;
return
cell; }, {}); }); };