On Fri, Jun 27, 2014 at 3:41 AM, Michał Gołębiowski <[email protected]> wrote:
> On Thu, Jun 26, 2014 at 4:50 PM, Russell Leggett < > [email protected]> wrote: >> >> >> //import a single named export >> import foo from "bar"; >> >> //import multiple named exports >> import foo, baz from "bar"; >> >> //alias an imported named export >> import foo as fooAlias from "bar"; >> >> //import the module >> import "bar" as bar; >> > > That would put a lot of Node modules exporting a single object/function at > a disadvantage. Compare: > ```js > var mkdr = require('mkdirp'); > ``` > to: > ```js > import mkdirp as mkdr from mkdirp; > ``` > > I like that the most common module usage can be done simpler. > > No, that example would be: import "mkdirp" as mkdir; Its actually shorter than node.
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

