Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Lazy require with filter logic for Node.js
tree: 1bb5cd6ff3

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
test
.gitignore
.travis.yml
History.md
Makefile
Readme.md
index.js
package.json

Readme.md

Redr

Lazy require for files.

Why?

  • Easy to mock.
  • Require only what you really have to.
  • Because I use it like everywhere and I'm too lazy to copy-paste code.

Install

$ npm install redr

Usage

var Redr = require('redr');
var files = new Redr('/path/to/controllers/').load();
var jobsController = files.get.jobs; // this will perform require

Features

  • Multiple paths
  • Validators

Tests

$ npm install
$ make test

License

MIT License.

Something went wrong with that request. Please try again.