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.
npm install
npm test
(ornpm run test:watch
if you want tests to automatically run after every save)- Following the article, making changes to
problems.js
- If you get stuck, refer to
solutions.js
- For "Identifiers" section, underscore.js will be your friend
- Martin Fowler for original article
- MDN for how to simulate set intersections and differences