ModuleLoader

ModuleLoader.fileIterator(paths, options, callback)undefined
static

synchronous helper function

Parameters:
  • paths
    • Type: Array or String
    • file as well as directory paths

  • options optional
    • Type: Object
      • except optional
        • Type: Array
        • collection of files/directories that should be excluded

  • callback
    • Type: function
    • is provided with file (string), dirPath (string) arguments

Returns: undefined
Example:
require('bi-service').moduleLoader.fileIterator
ModuleLoader.loadModules(paths, options)
static

recursive wrapper around native module.require

Parameters:
  • paths
    • Type: Array or String
    • collection of files/dirrectories, or single string path

  • options optional
    • Type: Object
      • cb optional
        • Type: function
        • the fn is provided with each required module

      • except optional
        • Type: Array
        • collection of files/directories that should be excluded

Example:
require('bi-service').moduleLoader.loadModules
comments powered by Disqus