lazy-fs

0.2.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i lazy-fs

Weekly Downloads

1

Version

0.2.0

License

MIT

Last publish

Collaborators

  • hyzhak