On Thu, Jul 4, 2013 at 7:43 AM, Axel Rauschmayer <[email protected]> wrote:

> When importing from a multi-export module, you need to wrap things in
> braces, which enables convenient syntax for single-export modules.
> Why? Have single-export modules in npm been counted? Are there more than
> multi-export modules?
>
> I’m guessing that single-export modules will usually export functions,
> right?
>
>
In a sense, doesn't require()-style modules enforce only single-exports?
Only a single value can be exported from a module, no?

I haven't been following the ES6 modules functionality super-closely, so I
may be misinformed: My understanding is that the current ES6 proposed way
to do module exports adds a new language construct for aggregating multiple
values and passing them to another part of the program (namely, that all
`export`'ed declarations are aggregated in a new way and made available to
`import` statements, which use new language constructs to access the values
aggregated by the module (`import foo from ...`, `module foo from ...`) and
renaming values (`as`)).


-- Sean Silva
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to