4 ms·
I like the IIFE because of the way it reads. A developer new to Node.js It's impossible to miss. Putting your export line at the bottom is begging for silly bug
by keithwhor 11y ago
I like the IIFE because of the way it reads. A developer new to Node.js It's impossible to miss. Putting your export line at the bottom is begging for silly bugs. Even if they're quick fixes, still annoying.
- curun1r 11y agoSeems like: export default class ... would be the clearest and least bug-prone and satisfies the "no extra closures" complaint. Considering you're buying into other ES6isms, why not use that one too?
- keithwhor 11y agoWill definitely be changing the module system to ES6 in the future. For now I prefer this pattern. :)