code: function getPackageConfigMatch(loader, normalized) {
      var pkgName, exactMatch = false, configPath;
      for (var i = 0; i < loader.packageConfigPaths.length; i++) {
        var packageConfigPath = loader.packageConfigPaths[i];
        var p = packageConfigPaths[packageConfigPath] || (packageConfigPaths[packageConfigPath] = createPkgConfigPathObj(packageConfigPath));
        if (normalized.length < p.length)
          continue;
        var match = normalized.match(p.regEx);
        if (match && (!pkgName || (!(exactMatch && p.wildcard) && pkgName.length < match[1].length))) {
          pkgName = match[1];
          exactMatch = !p.wildcard;
          configPath = pkgName + packageConfigPath.substr(p.length);
        }
      }
  
      if (!pkgName)
        return;
  
      return {
        packageName: pkgName,
        configPath: configPath
      };
    }
docs: most specific match wins