substack/node-resolve — pull request #27 by jaredhanson (2013-07-29 23:28:19+00:00)
Title: Proper handling when pkg.main points to a directory.

This is a fix for #22, in which a package has a dependency, and that dependency has a `pkg.main` property that points to a directory rather than a file.

This includes the same one-line fix as #24, and also includes a test case (which would fail without the fix).

See also: https://github.com/shtylman/node-browser-resolve/issues/27