require-stars

v0.0.5
[![Build Status](https://secure.travis-ci.org/rolandpoulter/node-require-stars.png)](http://travis-ci.org/rolandpoulter/node-require-stars)

Require Stars

Requires entire directories with one call to require.

How to install

npm install require-stars

How to run the tests

node ./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);
npm i require-stars

Metadata

  • Unknown
  • Whatever
  • rolandpoulter
  • released 12/7/2012

Downloads

Maintainers