Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 1023 Bytes

README.md

File metadata and controls

14 lines (11 loc) · 1023 Bytes

Refactoring Pipelines

This repo is for people who are mostly familiar with JavaScript to work through the Martin Fowler article Refactoring with Loops and Collection Pipelines. The problems.js file contains the initial code before each refactor. The solutions.js contains my solutions to the problems for comparison. The tests.js file contains tests that ensure that refactors do not break the public interface of the functions.

How to play

  1. npm install
  2. npm test (or npm run test:watch if you want tests to automatically run after every save)
  3. Following the article, making changes to problems.js
  4. If you get stuck, refer to solutions.js
    1. For "Identifiers" section, underscore.js will be your friend

Acknowledgements