{"_id":"require-all","_rev":"200552","name":"require-all","description":"An easy way to require all files within a directory.","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"dougwilson","email":""},{"name":"dscape","email":"nunojobpinto@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"thlorenz","email":"thlorenz@gmx.de"}],"time":{"modified":"2021-06-03T12:31:42.000Z","created":"2011-12-14T13:16:53.202Z","3.0.0":"2018-07-03T04:50:00.912Z","2.2.0":"2017-02-19T03:11:43.575Z","2.1.0":"2016-12-10T03:38:49.136Z","2.0.0":"2015-10-18T04:59:47.655Z","1.1.0":"2015-05-19T14:47:57.923Z","1.0.0":"2014-12-01T16:11:28.544Z","0.0.8":"2013-08-19T10:14:11.540Z","0.0.6":"2013-03-13T15:42:15.879Z","0.0.5":"2012-11-14T02:00:46.278Z","0.0.4":"2012-06-12T09:09:38.584Z","0.0.3":"2012-01-12T09:39:48.242Z","0.0.2":"2011-12-20T09:25:09.745Z","0.0.1":"2011-12-14T13:16:53.202Z"},"users":{"tehdb":true,"zhangyaochun":true,"shriek":true,"arnold-almeida":true,"tomjamescn":true,"titarenko":true,"gochomugo":true,"ericmash":true,"occsceo":true,"programmer.severson":true,"alin.alexa":true,"wendellm":true,"szymex73":true,"abhisekp":true,"wickie":true,"mariusc23":true,"rocket0191":true,"keenwon":true,"andreaspizsa":true,"cognivator":true,"esenor":true,"mattfwood":true,"dron":true,"efremropelato":true},"author":{"name":"Felix Geisendörfer","email":"felix@debuggable.com","url":"http://debuggable.com/"},"repository":{"type":"git","url":"git+https://github.com/felixge/node-require-all.git"},"versions":{"3.0.0":{"name":"require-all","description":"An easy way to require all files within a directory.","version":"3.0.0","author":{"name":"Felix Geisendörfer","email":"felix@debuggable.com","url":"http://debuggable.com/"},"contributors":[{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},{"name":"Prince Obiechine Onyenike","email":"leewaygroups@gmail.com"},{"name":"Nuno Job","email":"nunojobpinto@gmail.com","url":"http://nunojob.com"}],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/felixge/node-require-all.git"},"files":["Changes.md","LICENSE","index.js","Readme.md"],"engines":{"node":">= 0.8"},"scripts":{"test":"node test/test.js"},"gitHead":"5c6c878dae8d63da77acd62789fb17300c190f7a","bugs":{"url":"https://github.com/felixge/node-require-all/issues"},"homepage":"https://github.com/felixge/node-require-all#readme","_id":"require-all@3.0.0","_shasum":"473d49704be310115ce124f77383b1ebd8671312","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.14.3","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"dist":{"shasum":"473d49704be310115ce124f77383b1ebd8671312","size":4248,"noattachment":false,"key":"/require-all/-/require-all-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/require-all/download/require-all-3.0.0.tgz"},"maintainers":[{"name":"dougwilson","email":""},{"name":"dscape","email":"nunojobpinto@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/require-all_3.0.0_1530593400833_0.11494744303134974"},"_hasShrinkwrap":false,"publish_time":1530593400912,"_cnpm_publish_time":1530593400912},"2.2.0":{"name":"require-all","description":"An easy way to require all files within a directory.","version":"2.2.0","author":{"name":"Felix Geisendörfer","email":"felix@debuggable.com","url":"http://debuggable.com/"},"contributors":[{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},{"name":"Prince Obiechine Onyenike","email":"leewaygroups@gmail.com"},{"name":"Nuno Job","email":"nunojobpinto@gmail.com","url":"http://nunojob.com"}],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/felixge/node-require-all.git"},"devDependencies":{"semver":"4.3.2"},"files":["Changes.md","LICENSE","index.js","Readme.md"],"engines":{"node":"*"},"scripts":{"test":"node test/test.js"},"gitHead":"26e54fc123eb63eb7d4616cafd7ec3d2710d8cff","bugs":{"url":"https://github.com/felixge/node-require-all/issues"},"homepage":"https://github.com/felixge/node-require-all#readme","_id":"require-all@2.2.0","_shasum":"b4420c233ac0282d0ff49b277fb880a8b5de0894","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.7.3","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"dist":{"shasum":"b4420c233ac0282d0ff49b277fb880a8b5de0894","size":3453,"noattachment":false,"key":"/require-all/-/require-all-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/require-all/download/require-all-2.2.0.tgz"},"maintainers":[{"name":"dougwilson","email":""},{"name":"dscape","email":"nunojobpinto@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"thlorenz","email":"thlorenz@gmx.de"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/require-all-2.2.0.tgz_1487473901659_0.42778759473003447"},"directories":{},"publish_time":1487473903575,"_cnpm_publish_time":1487473903575,"_hasShrinkwrap":false},"2.1.0":{"name":"require-all","description":"An easy way to require all files within a directory.","version":"2.1.0","author":{"name":"Felix Geisendörfer","email":"felix@debuggable.com","url":"http://debuggable.com/"},"contributors":[{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},{"name":"Prince Obiechine Onyenike","email":"leewaygroups@gmail.com"},{"name":"Nuno Job","email":"nunojobpinto@gmail.com","url":"http://nunojob.com"}],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/felixge/node-require-all.git"},"devDependencies":{"semver":"4.3.2"},"files":["Changes.md","LICENSE","index.js","Readme.md"],"engines":{"node":"*"},"scripts":{"test":"node test/test.js"},"gitHead":"861e9910b59fbc5dc3cd1110e06b77c2f9e25ab4","bugs":{"url":"https://github.com/felixge/node-require-all/issues"},"homepage":"https://github.com/felixge/node-require-all#readme","_id":"require-all@2.1.0","_shasum":"109e1c3dab8a5acab2312f552d5e8d27d8de9f77","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.6.0","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"dist":{"shasum":"109e1c3dab8a5acab2312f552d5e8d27d8de9f77","size":3378,"noattachment":false,"key":"/require-all/-/require-all-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/require-all/download/require-all-2.1.0.tgz"},"maintainers":[{"name":"dougwilson","email":""},{"name":"dscape","email":"nunojobpinto@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"thlorenz","email":"thlorenz@gmx.de"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/require-all-2.1.0.tgz_1481341127342_0.9527717351447791"},"directories":{},"publish_time":1481341129136,"_cnpm_publish_time":1481341129136,"_hasShrinkwrap":false},"2.0.0":{"name":"require-all","description":"An easy way to require all files within a directory.","version":"2.0.0","author":{"name":"Felix Geisendörfer","email":"felix@debuggable.com","url":"http://debuggable.com/"},"contributors":[{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},{"name":"Nuno Job","email":"nunojobpinto@gmail.com","url":"http://nunojob.com"}],"license":"MIT","repository":{"type":"git","url":"https://github.com/felixge/node-require-all"},"devDependencies":{"semver":"4.3.2"},"files":["LICENSE","index.js","Readme.md"],"engines":{"node":"*"},"scripts":{"test":"node test/test.js"},"gitHead":"5244bb1d24a24eb5272280a45ae89120dc7f0909","bugs":{"url":"https://github.com/felixge/node-require-all/issues"},"homepage":"https://github.com/felixge/node-require-all","_id":"require-all@2.0.0","_shasum":"762a1f00c2fc1e24361981d4c1da31911f5fbe5d","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"dougwilson","email":""},{"name":"dscape","email":"nunojobpinto@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"thlorenz","email":"thlorenz@gmx.de"}],"dist":{"shasum":"762a1f00c2fc1e24361981d4c1da31911f5fbe5d","size":2261,"noattachment":false,"key":"/require-all/-/require-all-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/require-all/download/require-all-2.0.0.tgz"},"directories":{},"publish_time":1445144387655,"_cnpm_publish_time":1445144387655,"_hasShrinkwrap":false},"1.1.0":{"name":"require-all","description":"An easy way to require all files within a directory.","version":"1.1.0","author":{"name":"Felix Geisendörfer","email":"felix@debuggable.com","url":"http://debuggable.com/"},"contributors":[{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},{"name":"Nuno Job","email":"nunojobpinto@gmail.com","url":"http://nunojob.com"}],"license":"MIT","repository":{"type":"git","url":"https://github.com/felixge/node-require-all"},"devDependencies":{"semver":"~2.1.0"},"files":["LICENSE","index.js","Readme.md"],"engines":{"node":"*"},"scripts":{"test":"node test/test.js"},"gitHead":"68d19f6b0d27d6026eaae8c3f299692b456810f4","bugs":{"url":"https://github.com/felixge/node-require-all/issues"},"homepage":"https://github.com/felixge/node-require-all","_id":"require-all@1.1.0","_shasum":"7d50b9c9bc4d9d79bdfcc4b33f0fa46b7718ed5e","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"dougwilson","email":""},{"name":"dscape","email":"nunojobpinto@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"thlorenz","email":"thlorenz@gmx.de"}],"dist":{"shasum":"7d50b9c9bc4d9d79bdfcc4b33f0fa46b7718ed5e","size":2122,"noattachment":false,"key":"/require-all/-/require-all-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/require-all/download/require-all-1.1.0.tgz"},"directories":{},"publish_time":1432046877923,"_cnpm_publish_time":1432046877923,"_hasShrinkwrap":false},"1.0.0":{"author":{"name":"Felix Geisendörfer","email":"felix@debuggable.com","url":"http://debuggable.com/"},"name":"require-all","description":"An easy way to require all files within a directory.","version":"1.0.0","scripts":{"test":"node test/test.js"},"repository":{"type":"git","url":"git://github.com/felixge/node-require-all.git"},"licenses":[{"type":"MIT","url":"https://github.com/felixge/node-require-all/blob/master/License"}],"main":"./index","engines":{"node":"*"},"dependencies":{},"devDependencies":{"semver":"~2.1.0"},"optionalDependencies":{},"gitHead":"c43e39a898f4d55c03d7e5fc2dd0a689e0fea446","bugs":{"url":"https://github.com/felixge/node-require-all/issues"},"homepage":"https://github.com/felixge/node-require-all","_id":"require-all@1.0.0","_shasum":"8483708e7ce4c6dfad988b5080f97829b92d2227","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"dougwilson","email":""},{"name":"dscape","email":"nunojobpinto@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"thlorenz","email":"thlorenz@gmx.de"}],"dist":{"shasum":"8483708e7ce4c6dfad988b5080f97829b92d2227","size":1960,"noattachment":false,"key":"/require-all/-/require-all-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/require-all/download/require-all-1.0.0.tgz"},"directories":{},"publish_time":1417450288544,"_cnpm_publish_time":1417450288544,"_hasShrinkwrap":false},"0.0.8":{"author":{"name":"Felix Geisendörfer","email":"felix@debuggable.com","url":"http://debuggable.com/"},"name":"require-all","description":"An easy way to require all files within a directory.","version":"0.0.8","scripts":{"test":"node test/test.js"},"repository":{"type":"git","url":"git://github.com/felixge/node-require-all.git"},"licenses":[{"type":"MIT","url":"https://github.com/felixge/node-require-all/blob/master/License"}],"main":"./index","engines":{"node":"*"},"dependencies":{},"devDependencies":{"semver":"~2.1.0"},"optionalDependencies":{},"readmeFilename":"Readme.md","bugs":{"url":"https://github.com/felixge/node-require-all/issues"},"_id":"require-all@0.0.8","dist":{"shasum":"a7d4307d90e422fcb9f04af018c149920074e4b3","size":2722,"noattachment":false,"key":"/require-all/-/require-all-0.0.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/require-all/download/require-all-0.0.8.tgz"},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"dscape","email":"nunojobpinto@gmail.com"},"maintainers":[{"name":"dougwilson","email":""},{"name":"dscape","email":"nunojobpinto@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1376907251540,"_hasShrinkwrap":false,"_cnpm_publish_time":1376907251540},"0.0.6":{"author":{"name":"Felix Geisendörfer","email":"felix@debuggable.com","url":"http://debuggable.com/"},"name":"require-all","description":"An easy way to require all files within a directory.","version":"0.0.6","scripts":{"test":"node test/test.js"},"repository":{"type":"git","url":"git://github.com/felixge/node-require-all.git"},"licenses":[{"type":"MIT","url":"https://github.com/felixge/node-require-all/blob/master/License"}],"main":"./index","engines":{"node":"*"},"dependencies":{},"devDependencies":{},"optionalDependencies":{},"readmeFilename":"Readme.md","_id":"require-all@0.0.6","dist":{"shasum":"55511803174a7c73d13955bf5f47e7751a54f49a","size":3687,"noattachment":false,"key":"/require-all/-/require-all-0.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/require-all/download/require-all-0.0.6.tgz"},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"dougwilson","email":""},{"name":"dscape","email":"nunojobpinto@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1363189335879,"_hasShrinkwrap":false,"_cnpm_publish_time":1363189335879},"0.0.5":{"author":{"name":"Felix Geisendörfer","email":"felix@debuggable.com","url":"http://debuggable.com/"},"name":"require-all","description":"An easy way to require all files within a directory.","version":"0.0.5","scripts":{"test":"node test/test.js"},"repository":{"url":""},"main":"./index","engines":{"node":"*"},"dependencies":{},"devDependencies":{},"optionalDependencies":{},"readmeFilename":"Readme.md","_id":"require-all@0.0.5","dist":{"shasum":"59cf931a194a2f7f3006db8122f0ce641ea1ab21","size":1707,"noattachment":false,"key":"/require-all/-/require-all-0.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/require-all/download/require-all-0.0.5.tgz"},"_npmVersion":"1.1.65","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"dougwilson","email":""},{"name":"dscape","email":"nunojobpinto@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1352858446278,"_hasShrinkwrap":false,"_cnpm_publish_time":1352858446278},"0.0.4":{"author":{"name":"Felix Geisendörfer","email":"felix@debuggable.com","url":"http://debuggable.com/"},"name":"require-all","description":"An easy way to require all files within a directory.","version":"0.0.4","repository":{"url":""},"main":"./index","engines":{"node":"*"},"dependencies":{},"devDependencies":{},"optionalDependencies":{},"_npmUser":{"name":"felixge","email":"felix@debuggable.com"},"_id":"require-all@0.0.4","_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.18-pre","_defaultsLoaded":true,"dist":{"shasum":"18ae7c2e87a04a61f44f00a6ad0483f792925518","size":1433,"noattachment":false,"key":"/require-all/-/require-all-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/require-all/download/require-all-0.0.4.tgz"},"maintainers":[{"name":"dougwilson","email":""},{"name":"dscape","email":"nunojobpinto@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1339492178584,"_hasShrinkwrap":false,"_cnpm_publish_time":1339492178584},"0.0.3":{"author":{"name":"Felix Geisendörfer","email":"felix@debuggable.com","url":"http://debuggable.com/"},"name":"require-all","description":"An easy way to require all files within a directory.","version":"0.0.3","repository":{"url":""},"main":"./index","engines":{"node":"*"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"felixge","email":"felix@debuggable.com"},"_id":"require-all@0.0.3","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.13-pre","_defaultsLoaded":true,"dist":{"shasum":"051e192246c00d399bfe6164bc4e810bc588e01a","size":10240,"noattachment":false,"key":"/require-all/-/require-all-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/require-all/download/require-all-0.0.3.tgz"},"maintainers":[{"name":"dougwilson","email":""},{"name":"dscape","email":"nunojobpinto@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1326361188242,"_hasShrinkwrap":false,"_cnpm_publish_time":1326361188242},"0.0.2":{"author":{"name":"Felix Geisendörfer","email":"felix@debuggable.com","url":"http://debuggable.com/"},"name":"require-all","description":"An easy way to require all files within a directory.","version":"0.0.2","repository":{"url":""},"main":"./index","engines":{"node":"*"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"felixge","email":"felix@debuggable.com"},"_id":"require-all@0.0.2","_engineSupported":true,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"ebc052a6cd8dbb01e727d4acbf8f1b45a71fd0a3","size":4132,"noattachment":false,"key":"/require-all/-/require-all-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/require-all/download/require-all-0.0.2.tgz"},"maintainers":[{"name":"dougwilson","email":""},{"name":"dscape","email":"nunojobpinto@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1324373109745,"_hasShrinkwrap":false,"_cnpm_publish_time":1324373109745},"0.0.1":{"author":{"name":"Felix Geisendörfer","email":"felix@debuggable.com","url":"http://debuggable.com/"},"name":"require-all","description":"An easy way to require all files within a directory.","version":"0.0.1","repository":{"url":""},"main":"./index","engines":{"node":"*"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"felixge","email":"felix@debuggable.com"},"_id":"require-all@0.0.1","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.13-pre","_defaultsLoaded":true,"dist":{"shasum":"e60f6afbf19edde208bc7a878a465698d0759e83","size":10240,"noattachment":false,"key":"/require-all/-/require-all-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/require-all/download/require-all-0.0.1.tgz"},"maintainers":[{"name":"dougwilson","email":""},{"name":"dscape","email":"nunojobpinto@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1323868613202,"_hasShrinkwrap":false,"_cnpm_publish_time":1323868613202}},"readme":"# require-all\n\nAn easy way to require all files within a directory.\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Build Status][travis-image]][travis-url]\n\n## Usage\n\n```js\nvar controllers = require('require-all')({\n  dirname     :  __dirname + '/controllers',\n  filter      :  /(.+Controller)\\.js$/,\n  excludeDirs :  /^\\.(git|svn)$/,\n  recursive   : true\n});\n\n// controllers now is an object with references to all modules matching the filter\n// for example:\n// { HomeController: function HomeController() {...}, ...}\n```\n\n## Advanced usage\n\nIf your objective is to simply require all .js and .json files in a directory\nyou can just pass a string to require-all:\n\n``` js\nvar libs = require('require-all')(__dirname + '/lib');\n```\n\n### Constructed object usage\n\nIf your directory contains files that all export constructors, you can require\nthem all and automatically construct the objects using `resolve`:\n\n```js\nvar controllers = require('require-all')({\n  dirname     :  __dirname + '/controllers',\n  filter      :  /(.+Controller)\\.js$/,\n  resolve     : function (Controller) {\n    return new Controller();\n  }\n});\n```\n\n### Alternative property names\n\nIf your directory contains files where the names do not match what you want in\nthe resulting property (for example, you want camelCase but the file names are\nsnake_case), then you can use the `map` function. The `map` function is called\non both file and directory names, as they are added to the resulting object.\n\n```js\nvar controllers = require('require-all')({\n  dirname :  __dirname + '/controllers',\n  filter  :  /(.+Controller)\\.js$/,\n  map     : function (name, path) {\n    return name.replace(/_([a-z])/g, function (m, c) {\n      return c.toUpperCase();\n    });\n  }\n});\n```\n\n### Filtering files\n\nIf your directory contains files that you do not want to require, or that you\nwant only a part of the file's name to be used as the property name, `filter`\ncan be a regular expression. In the following example, the `filter` is set to\n`/^(.+Controller)\\.js$/`, which means only files that end in \"Controller.js\"\nare required, and the resulting property name will be the name of the file\nwithout the \".js\" extension. For example, the file \"MainController.js\" will\nmatch, and since the first capture group will contain \"MainController\", that\nwill be the property name used. If no capture group is used, then the entire\nmatch will be used as the name.\n\n```js\nvar controllers = require('require-all')({\n  dirname : __dirname + '/controllers',\n  filter  : /^(.+Controller)\\.js$/\n});\n```\n\nFor even more advanced usage, the `filter` option also accepts a function that\nis invoked with the file name as the first argument. The filter function is\nexpected to return a falsy value to ignore the file, otherwise a string to use\nas the property name.\n\n```js\nvar controllers = requireAll({\n  dirname : __dirname + '/controllers',\n  filter  : function (fileName) {\n    var parts = fileName.split('-');\n    if (parts[1] !== 'Controller.js') return;\n    return parts[0];\n  }\n});\n```\n\nNote that empty directories are always excluded from the end result.\n\n[npm-image]: https://img.shields.io/npm/v/require-all.svg\n[npm-url]: https://npmjs.org/package/require-all\n[downloads-image]: https://img.shields.io/npm/dm/require-all.svg\n[downloads-url]: https://npmjs.org/package/require-all\n[travis-image]: https://img.shields.io/travis/felixge/node-require-all/master.svg\n[travis-url]: https://travis-ci.org/felixge/node-require-all\n","_attachments":{},"homepage":"https://github.com/felixge/node-require-all#readme","bugs":{"url":"https://github.com/felixge/node-require-all/issues"},"license":"MIT"}