Modules allow for complex abstraction, and I mean complex. Take, for example, an NPM package like KnexJS or Request. Turning API communication into a two parameter function is some powerful stuff. Don’t get me wrong there are dangers in abstraction, especially for the impatient. But the benefits far out way the costs in terms of the complexity you can build up.
Many people complain about getting package crazy or about an application becoming nothing more than a collection of packages. Well that’s great! I’m not concerned about writing the most efficient possible methods for each individual function, but if you are more power to you! It really comes down to this: It’s better to let people who are passionate about something work on it, they will always come up with more secure, better, and efficient ways to do something than someone who is writing code that they aren’t interested in that someone else has written a million times better.
The same principal applies to crypto, but no one bats an eyelash about using AES all day do they?
What I’m trying to say is this, well functioning complex systems have most of their functionality abstracted away by more qualified people so the developer can focus on… can you guess it? Developing!