DEV Community

Discussion on: Probably the hottest code refactoring you ever saw 🔥

Collapse
 
potouridisio profile image
Ioannis Potouridis

Well one way or another the formatAddress function needs to know the business rules. If I went with your approach I would pass the rules as an argument.