requireasarray
v0.3.0
Published
require directory and sub directories and return all of them as array
Downloads
4
Readme
requireasarray
require directory and sub directories and return all of them as array
Usage
so simple, look at the example
//src/routers/index.js
module.exports = require('requireasarray')();
nothing left.
Also, it accepts an extra argument that describe which directory you wish to require them as array. example:
//src/index.js
const routers = require('requireasarray')('./routers/');