You actually broke your final rule with your "do" for "Have modular loop logic". Actually a lot of your code would be sent back for changes from me, because I have a big pet peeve about reassignment and mutating objects. Instead, use a ternary with a const assignment instead of using let and then reassigning with "if", and then instead of running an object through a bunch of functions that mutate it, use a strategy where each function returns a new object with the desired properties. You can then either use destructuring to combine their output, or use reduce to pass each piece from one function to the next.