code: function perform_require(reqfunc, plugin_desc, builtin, level) {
    var search_list = plugin_desc.search
    var initfunc, search
  
    next_search_entry: for (var i = 0; i < search_list.length; i++) {
      search = search_list[i]
  
      // only load builtins if builtin flag true
      if (!builtin && 'builtin' == search.type) continue
  
      if (0 === level && 'builtin' != search.type && search.name.match(/^[.\/]/))
        continue
  
      try {
        plugin_desc.history.push({ module: reqfunc.module, path: search.name })
  
        initfunc = reqfunc(search.name)
  
        // Found it!
        break
      } catch (e) {
        if ('MODULE_NOT_FOUND' == e.code) {
          // A require failed inside the plugin.
          if (-1 == e.message.indexOf(search.name)) {
            return { error: e, found: search }
          }
  
          // Plain old not found, so continue searching.
          continue next_search_entry
        } else {
          // The require failed for some other reason.
          return { error: e, found: search }
        }
      }
    }
  
    // Return the init function, and a description of where we found it.
    return {
      initfunc: initfunc,
      module: reqfunc.module,
      require: search.name,
      found: search
    }
  }
docs: #### Iterate over all the search items using the provided require function