2 ms·
I can think of one. When we write (say "ES6") modules it makes sense that the name of the module-file without extension should be the same as the value exported
by galaxyLogic 5y ago
I can think of one. When we write (say "ES6") modules it makes sense that the name of the module-file without extension should be the same as the value exported by that module.
Inside the module you'd prefer to follow conventions like name classes title-case and name functions camel-case.
Thus you might have one module exporting a class named "Camel", and another module exporting a function named "camel". You could then have two files, Camel.js, and camel.js in the same directory, containing two separate programs.