node-lazyloader
v1.0.1
Published
A dynamic file loader for node, loads files if they are in a directory
Downloads
172
Maintainers
Readme
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');