npm install needsNeeds
=====





Require multiple modules in node.js.
``bash`
$ npm install needs --save
`js
var needs = require('needs');
needs(__dirname, 'controllers', {
includes: /(.+Controller)\.js$/,
excludes: /^\.(git|svn)$/
});
// controllers now is an object with references to all modules matching the filter
// for example:
// { HomeController: function HomeController() {...}, ...}
`
`js`
// or using minimatch string
needs(__dirname, 'controllers', {
includes: '+(.js|.json)',
excludes: '+(.git|.svn)'
});
`js`
needs(__dirname, 'controllers', {
includes: ['.js', '.json'],
excludes: ['.git', '.svn']
});
`js`
needs(__dirname, 'controllers', ['.js', '.json']);
`js
needs(__dirname, 'controllers', ['.js', '.json', '!.git', '!.svn']);
// or default includes ['.js', '.json'] and excludes ['!.git', '!.svn']
needs(__dirname, 'controllers');
``
Copyright (c) 2014 Tao Yuan
Licensed under the MIT license.