Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Minor formatting changes

  • Loading branch information...
commit 75a2d3190b40c918487c2c42177f41fdf892946e 1 parent f6d98d3
@dscape dscape authored
Showing with 6 additions and 7 deletions.
  1. +6 −7 index.js
View
13 index.js
@@ -1,23 +1,23 @@
-var fs = require('fs');
+var fs = require('fs');
module.exports = function requireAll(options) {
- var files = fs.readdirSync(options.dirname);
+ var files = fs.readdirSync(options.dirname);
var modules = {};
function excludeDirectory(dirname) {
return options.excludeDirs && dirname.match(options.excludeDirs);
}
- files.forEach(function(file) {
+ files.forEach(function (file) {
var filepath = options.dirname + '/' + file;
if (fs.statSync(filepath).isDirectory()) {
if (excludeDirectory(file)) return;
modules[file] = requireAll({
- dirname : filepath,
- filter : options.filter,
- excludeDirs : options.excludeDirs
+ dirname: filepath,
+ filter: options.filter,
+ excludeDirs: options.excludeDirs
});
} else {
@@ -30,4 +30,3 @@ module.exports = function requireAll(options) {
return modules;
};
-
Please sign in to comment.
Something went wrong with that request. Please try again.