require with no filename

33 views
Skip to first unread message

Mark Volkmann

unread,
Oct 20, 2014, 11:39:31 AM10/20/14
to nod...@googlegroups.com
What does this pull in?

var foo = require('../');

--
R. Mark Volkmann
Object Computing, Inc.

Aria Stewart

unread,
Oct 20, 2014, 11:47:21 AM10/20/14
to nod...@googlegroups.com

> On Oct 19, 2014, at 6:04 PM, Mark Volkmann <r.mark....@gmail.com> wrote:
>
> What does this pull in?
>
> var foo = require('../');

Like any require of a relative path that ends up being a directory, it tries a package.json and its main; if not, it tries index.js relative to the directory.

Aria

Reply all
Reply to author
Forward
0 new messages