code: function (dirname, indexpath) {
      var extensions = {js: 1},
          modules = {};
  
      indexpath = indexpath || path.join(dirname, 'index.js');
  
      // Load all exported objects into a single module.
      fs.readdirSync(dirname).forEach(function (filename) {
        var fullpath = path.join(dirname, filename),
            parts    = filename.split('.'),
            module, name;
  
        if (fullpath !== indexpath && extensions[parts.pop()] && '.' !== filename[0]) {
          name = parts.join('.');
          module = require(fullpath);
  
          // Grab the function name or module name if possible.
          if (typeof module.name === 'string') {
            name = module.name;
          }
  
          modules[name] = module;
        }
      });
  
      return modules;
    }
docs: Helper function for creating an index file in a directory. It loads all modules within the provided directory excluding the file provided as "indexpath". These will then be returned.  Example:  module.exports = utils.index(__dirname, __filename);