3 ms·
I agree for different reasons. In our code we never export a single value without name because it's not consistent. Many of our modules export a single class wi
by DiThi 9y ago
I agree for different reasons. In our code we never export a single value without name because it's not consistent. Many of our modules export a single class with the same name as the module. One less thing to remember.
I dislike when I use some external module and I have to look up whether the module is the value or not...
Edit: as an additional annoyance, when mixing CommonJS and ES6, the value may be in an element called "default". In some cases. I'm still unsure when.