5 ms·
> https://github.com/KELiON/cerebro/blob/master/app/AppUpdater.js https://github.com/KELiON/cerebro/blob/master/app/AppUpdater... : > export default class AppU
by lettersdigits 10y ago
> https://github.com/KELiON/cerebro/blob/master/app/AppUpdater.js https://github.com/KELiON/cerebro/blob/master/app/AppUpdater... :
> export default class AppUpdater {
......
why is this a class ? just so it can auto-exececute without being called ?
i would prefer an 'export default function init(){ // init code'
- rounce 10y agoNot even. `export default new class ...` would be 'equivalent' to an IIFE; using CommonJS module caching to produce singleton behaviour. This should just export a function. That's it.