0.2.0 • Published 10 years ago

lazy-fs v0.2.0

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

lazy-fs

Build Status

Extension to add to file system functional syntax. Lazy.js under the hood.

Installation

$ npm install lazy-fs --save

Example

var lazyfs = require('lazy-fs');

/**
 * get all 'model.js' in ./modules folder and instantiate them with config
 */

lazyfs.dir(path.join(__dirname, 'modules'))
    .filter(lazyfs.isFile)
    .filter(function(file) {
        return file.name === 'model.js';
    ))
    .each(function(model) {
        //instantiate model
        require(model.path)(config);
    });
0.2.0

10 years ago

0.1.0

10 years ago