Skip to content

hyzhak/lazy-fs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lazy-fs

![Gitter](https://badges.gitter.im/Join Chat.svg)

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);
    });

About

Extension to add functional syntax to the file system. Use Lazy.js https://github.com/dtao/lazy.js under the hood.

Resources

License

Stars

Watchers

Forks

Packages

No packages published