ModuleImport

Kevin Smith zenparsing at gmail.com
Fri Jun 27 07:11:30 PDT 2014


>
>
>
>     var mkdirp = require('mkdirp');
>

Exactly.  In ES, you would see this:

    import { mkdrip } from "mkdirp";

Python has a somewhat similar module system, and import-renaming is the
exception, not the rule.  Also, I've never heard anyone complain about
having to know the name of a module member.  In fact, specifying the
exported name is essential for tracing out a code base that you're
unfamiliar with.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140627/a0fb6ee0/attachment.html>


More information about the es-discuss mailing list