homerchen19 / nba-go

🏀 💻 The finest NBA CLI.
https://www.npmjs.com/package/nba-go
MIT License
3.71k stars 221 forks source link

Replace `.map` and `.filter` with a single `.reduce` #63

Closed emyarod closed 6 years ago

emyarod commented 6 years ago

Small optimization...probably not worth it, but this allows you to iterate over the command list just once with .reduce instead of twice with .map and .filter

homerchen19 commented 6 years ago

Hi @emyarod Thanks for your contribution, but I don't think this optimization is necessary, cuz it's not quiet readable and understandable. nba-go has imported ramda, so maybe you could use it for optimization.

Cheers 😄