JSPM

node-lazyloader

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 75
  • Score
    100M100P100Q65470F
  • License MIT

A dynamic file loader for node, loads files if they are in a directory

Package Exports

  • node-lazyloader

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-lazyloader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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