troygoode/node-require-directory — pull request #10 by cjroth (2014-07-16 19:45:25+00:00)
Title: add argument to convert filenames to camel case. not backward compatible.

This is a long shot - it adds an additional argument so it would break backward compatibility, but I think it's quite useful.

The use case is that I name files as spinal case:
```
/routes
/my-route.js
```

But I want to use them like so:

// app.js
```
var routes = requireDirectory(module, __dirname + '/routes', null, true);
app.get('/my-route', routes.myRoute);
```

Because referring to things like this sucks:
```
app.get('/my-route', routes['my-route']);
```

I like the idea of switching to a config object instead of separate arguments to solve the backward-compatibility issue for future versions.