On 6 May 2012 19:47, Isaac Schlueter <[email protected]> wrote:
> Why not just do require('foo/bar.js') instead of require('foo').bar?

Less typing & fewer accidents when you have lots of the same type of module
(and its safe to assume that wanting one means wanting all) e.g. when
mapping URL handlers.





On 6 May 2012 19:47, Isaac Schlueter <[email protected]> wrote:

> Why not just do require('foo/bar.js') instead of require('foo').bar?
>
> On Sat, May 5, 2012 at 1:45 AM, Richard Marr <[email protected]>
> wrote:
> > Nice.
> >
> > I often do something pretty similar; putting something like this in
> > index.js:
> > https://gist.github.com/1122217
> >
> >
> >
> > On 4 May 2012 03:19, Stephen Handley <[email protected]> wrote:
> >>
> >> New package to allow writing minimal node index.js/index.coffee files
> that
> >> require and export siblings by file basename. Would appreciate any
> >> feedback... I assumed there was native support for something like this
> in
> >> node, but haven't found anything.
> >>
> >> https://github.com/stephenhandley/requireindex
> >>
> >> --
> >> Job Board: http://jobs.nodejs.org/
> >> Posting guidelines:
> >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> >> You received this message because you are subscribed to the Google
> >> Groups "nodejs" group.
> >> To post to this group, send email to [email protected]
> >> To unsubscribe from this group, send email to
> >> [email protected]
> >> For more options, visit this group at
> >> http://groups.google.com/group/nodejs?hl=en?hl=en
> >
> >
> >
> >
> > --
> > Richard Marr
> >
> > --
> > Job Board: http://jobs.nodejs.org/
> > Posting guidelines:
> > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> > You received this message because you are subscribed to the Google
> > Groups "nodejs" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> > http://groups.google.com/group/nodejs?hl=en?hl=en
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>



-- 
Richard Marr

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to