1.0.1 • Published 9 years ago

node-lazyloader v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

node-lazyloader

A dynamic file loader for NodeJS, loads files (via require) if they are in a directory

Install

npm install lazyloader

How to Use

var LazyLoader = require('node-lazyloader');

var lazy = new LazyLoader({
    debug: true, //gives you more verbose output
    filter: function(file) {
        //compare a file to block out
        if ('donotincludefile.js' === file) {
            return false;
        }
        return true;
    }
});

var allFiles = lazy.fetch('/path/to/node/files');