Hacker News new | past | comments | ask | show | jobs | submit login

Tiny suggestion - instead of

  .map(g => { return { key: g.key, rows: g.rows.map(r => r[1]) }})
you can write

  .map(g => ({ key: g.key, rows: g.rows.map(r => r[1]) }))



You could also destructure g to end up with:

.map(({ key, rows }) => ({ key, rows: rows.map(r => r[1]) }))


also:

  .map(({ key, rows }) => ({ key, rows: rows.map(([page, link]) => link) }))
and

  .groupBy(p => p[0])
to

  .groupBy(([link, file]) => link)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: