How many classes/functions are best put into a module (which is later require
d, f.ex. by RequireJS, the Mozilla addon loader, ...)?
As the module seems to be imported wholesale (contrary to f.ex. Python, where you can do from module import class
), would it be best to keep them as small as possible? Any other guidelines?
What is the best practice?
(There are similar questions about Java (which recommends "the more granular class layout you have, the better"), Python (which allows for more objects and states "Python is not C#/Java. Trying to bend it to make it look like $other_language
will cause frustration and poor user experience") , etc, but nothing JavaScript-specific appeared.)
Maybe these questions were old enough to pass the site standards then. Nowadays, it might be really too broad for some.