code: function iterateOverJsFiles(dir, callback, depth) {
  
      depth = depth || 0;
      if (depth > MAX_LOAD_DEPTH) {
          return;
      }
      //logger.debug('Looking for files in %s at depth %s', dir, depth);
  
      if (fs.existsSync(dir)) {
          var files = fs.readdirSync(dir);
          _.forEach(files, function (file) {
              if (path.extname(file) === '.js') {
                  return callback(dir, file);
              } else {
                  var subDir = path.resolve(dir, file);
                  if (fs.lstatSync(subDir).isDirectory()) {
                      iterateOverJsFiles(subDir, callback, depth + 1);
                  }
              }
          });
      } else { // jshint ignore:line
          //logger.warn('%s is not a valid directory', dir);
      }
  }
docs: don't recurse below one subdir when looking for services/consumers /*
  Use this to locate modules in the given directory.
  For each js file found, callback is called with two parameters callback(dir, file)
  where dir is the current directory and file is the file name.
  depth is used to keep track of how deep we've recursed.
  We won't recurse beyond MAX_LOAD_DEPTH