Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
An easy way to require all files within a directory.
JavaScript
tree: db1c1c55b4

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Readme.md
index.js
package.json

Readme.md

require-all

An easy way to require all files within a directory.

Usage

var controllers = require('require-all')({
  directory: __dirname + '/controllers',
  filter: /(.+Controller)\.js$/,
});

// controllers now is an object with references to all modules matching the filter
// for example:
// { HomeController: function HomeController() {...}, ...}
Something went wrong with that request. Please try again.