On Thu, Feb 9, 2017 at 4:41 PM, Romuald Quantin <[email protected]> wrote:
> Usually solved this way:
>
> - export something to instantiate (a function or a class)
>
> ```
> module.exports = MyClass;
> ```
> - export an object (will be shared, only one instance)
>
> ```
> module.exports = {};
> ```
> - export a new instance every time
>
> ```
> module.exports = new MyClass();
> ```
>
My question was about some spec details wrt standard ES modules, not about
nodejs.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss