Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

38 lines (20 sloc) 0.672 kB

Require Stars

Build Status

Requires entire directories with one call to require.

How to install

npm install require-stars

How to run the tests

npm test

How to use

Require shallow directory

require('require-stars')();

requrie('./myDir/*');

Require recursivley:

require('./myDir/**');

Enumerate directory exports:

var list = [],
    flat = {};

require('require-stars/enum')(require('./myDir/**'), function (exports, name, path, obj) {
    list.push(exports);
    flat[path] = exports;
}, this);
Jump to Line
Something went wrong with that request. Please try again.