OK, good. Favoring single-export modules over multi-export modules seems like
the right call, then.
On Jul 22, 2013, at 7:23 , Ryan Florence wrote:
>> Have single-export modules in npm been counted?
>
> A look at npm would not be a representative sampling of JavaScript modules.
>
> NPM houses
> Have single-export modules in npm been counted?
A look at npm would not be a representative sampling of JavaScript modules.
NPM houses library code, which lends itself more toward multi-export than
application code does, in my experience anyway.
Every client app I've worked on has some sort o
On Thu, Jul 4, 2013 at 5:05 PM, Axel Rauschmayer wrote:
> In Node.js, the difference is:
>
> module.exports = function () { … };
>
> versus
>
> module.exports = {
> foo: …,
> bar: …,
> baz: …
> };
>
> So, conceptually, the former piece of code exports a single
In Node.js, the difference is:
module.exports = function () { … };
versus
module.exports = {
foo: …,
bar: …,
baz: …
};
So, conceptually, the former piece of code exports a single value, while the
latter exports multiple values.
Axel
On Jul 4, 2013, at 23:4
On Thu, Jul 4, 2013 at 7:43 AM, Axel Rauschmayer 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?
>
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 func
6 matches
Mail list logo