Jason Gorman demonstrates how to apply the principles of Modular Design in functional JavaScript.
Modules should:
1. Do one job
2. Hide their inner workings (e.g., data)
3. Have swappable dependencies
4. Only expose what clients need to use
Source code: https://github.com/jasongorman/js_mod...