requireall

1.0.0 • Public • Published

requireall

Returns an array of results based on "require"ing all files that match the glob pattern.

Usage

The following example shows how you could easily modularize an express app and automatically load the modules from a directory.

var express = require('express'),
    requireall = require('requireall');
 
var app = express();
 
...
 
requireall('modules/*.js').forEach(function(factory) {
    factory(app);
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    38
    • latest

Version History

Package Sidebar

Install

npm i requireall

Weekly Downloads

176

Version

1.0.0

License

MIT

Last publish

Collaborators

  • dbmeads