At some point code is complicated less if you introduce a new abstract than if you continue as it was.
Some trigger should fire in a head of a programmer. Like, I was coding fine, but now I've added a few lines of code so I need to stop introducing that much complexity and incapsulate those into a new method. Programmer should complicate easy things step-by-step. Do not introduce new abstracts before they're needed.
Asyncronous modules (AMD) like RequireJS help to organize code in JavaScript. But when the trigger of introducing this abstract should fire?