Refactoring Javascript: Collection Pipelines

Michael Timbs
The Startup
Published in
4 min readAug 29, 2020

--

Refactoring Javascript: Collection Pipelines

This is the first post in a series of posts about refactoring your Javascript code to use map, filter and reduce instead of loops. I refer to this style of programming as Collection Pipelines as I was first introduced to this concept in Martin Fowler’s Refactoring.

One of the first control structures we learn as programmers is loops. In Javascript, loops still tend to be the default way…

--

--

Michael Timbs
The Startup

Full-stack developer. In love with Typescript and Serverless