A JavaScript SOLID example.