felixge/node-require-all — pull request #5 by mikermcneil (2013-01-01 01:07:02+00:00)
Title: If the starting path pattern doesn't exist, return false instead of throwing an error.

This is a tiny (but important imo) patch that catches the error thrown by a missing directory and returns false instead. This is to prevent errors in the modules being required from being squashed.

For instance, with the current behavior, if I have an optional directory, say `services`, an error will be thrown if it does not exist. If I catch that error, however, I will also be catching errors from the modules in the `services` directory. This can be confusing.

In Sails, I had been doing a `stat` to check, but I thought this might be useful for others.

`require-all` is a great tool. Thanks!
Mike