SRP in JavaScript