Convert a given moduleId to an absolute path.
@param {string} id The moduleId to normalize.
@returns {string} The normalized path.
3368
function toAbsolute(id) {
    return id.startsWith("./") ? path.resolve(id) : require.resolve(id)
}
742157
private static String normalizePath(final Service service) {
        var path = service.getId();
        path = StringUtils.substringBefore(path, "?");
        path = StringUtils.substringBefore(path, ";");
        path = StringUtils.substringBefore(path, "#");
        return path;
    }
924752
function normalize( id, baseId ) {
        if ( !id ) {
            return '';
        }

        baseId = baseId || '';
        var idInfo = parseId( id );
        if ( !idInfo ) {
            return id;
        }

        var resourceId = idInfo.resource;
        var moduleId = relative2absolute( idInfo.module, baseId );

        each(
            packagesIndex,
            function ( packageConf ) {
                var name = packageConf.name;
                if ( name === moduleId ) {
                    moduleId = name + '/' + packageConf.main;
                    return false;
                }
            }
        );

        // 根据config中的map配置进行module id mapping
        indexRetrieve(
            baseId,
            mappingIdIndex,
            function ( value ) {

                indexRetrieve(
                    moduleId,
                    value,
                    function ( mdValue, mdKey ) {
                        moduleId = moduleId.replace( mdKey, mdValue );
                    }
                );

            }
        );

        if ( resourceId ) {
            var module = modGetModuleExports( moduleId );
            resourceId = module.normalize
                ? module.normalize(
                    resourceId,
                    function ( resId ) {
                        return normalize( resId, baseId );
                    }
                  )
                : normalize( resourceId, baseId );

            moduleId += '!' + resourceId;
        }

        return moduleId;
    }
901677
public String addId(final URI id) {
        if (id == null) {
            return null;
        }
        final URI localId = id.normalize();
        index ++;
        final String newId = PREFIX + Integer.toString(index);
        idMap.put(localId, newId);
        return newId;
    }
259427
public static String getModuleName(final String moduleId) {
        final int splitter = moduleId.indexOf(':');
        if(splitter == -1){
            return moduleId;
        }
        return moduleId.substring(0, splitter);
    }
934460
function(id) {
            for (var i in this.ids) {
                if (this.ids[i][id]) {
                    return this.ids[i][id];
                }
            }
            return null;
        }
907877
static String normalize(String path, Iterable<String> moduleRootPaths) {
    String normalizedPath = path;
    if (isAmbiguousIdentifier(normalizedPath)) {
      normalizedPath = MODULE_SLASH + normalizedPath;
    }

    // Find a moduleRoot that this URI is under. If none, use as is.
    for (String moduleRoot : moduleRootPaths) {
      if (normalizedPath.startsWith(moduleRoot)) {
        // Make sure that e.g. path "foobar/test.js" is not matched by module "foo", by checking for
        // a leading slash.
        String trailing = normalizedPath.substring(moduleRoot.length());
        if (trailing.startsWith(MODULE_SLASH)) {
          return trailing.substring(MODULE_SLASH.length());
        }
      }
    }
    // Not underneath any of the roots.
    return path;
  }
876854
function resolveByPlugin(plugin, from, id) {
	if (plugin.exports && plugin.exports.normalize) {
		return plugin.exports.normalize(id, resolveId.bind(null, from));
	}
	return resolveId(from, id);
}
389454
public TreeNode getModuleTree(final String moduleId) {
        final ModuleHandler moduleHandler = new ModuleHandler(repoHandler);
        final DbModule module = moduleHandler.getModule(moduleId);

        final TreeNode tree = new TreeNode();
        tree.setName(module.getName());

        // Add submodules
        for (final DbModule submodule : module.getSubmodules()) {
            addModuleToTree(submodule, tree);
        }

        return tree;
    }
1186907
function idToPath(id, config) {
    var alias = config.alias || {};
    return alias.hasOwnProperty(id) ?
        path.resolve(alias[id]) :
        path.resolve(config.base, id) + '.js';
}
623791
public MapAddon getAddon(String id) {
		MapAddon found = null;
		for (MapAddon addon : addons) {
			if (addon.getId().equals(id)) {
				found = addon;
				break;
			}
		}
		return found;
	}
656180
public function to_path(string $id){
    if ( bbn\str::is_uid($id) ){
      return $this->options->to_path($id, '', $this->_get_public_root());
    }
    return false;
  }
562659
public NodeConfig setId(String id) {
    return setId(id != null ? NodeId.from(id) : null);
  }
20521
function getId(id){
        if(_.isObject(id) && !_.isUndefined(id.id)){
            if (objectIdRegex.test(id.id)) {
                id = id.id;
            }
            else {
                id = null;
            }
        }
        return id;
    }
338484
function normalizeId(idFromRoot, root) {
  var id = idFromRoot.substring().trim();
  if (root && id.length > 0 && id[0] === '/') {
    id = id.substring(1);
  }
  id = root + id;
  return id;
}
175272
function (id)
		{
			var m = this.getModule('server-'+id, function (server) {
				self.e.loadServer(server);
			});
			_serverModules.push(m);
			return m;
		}
497
function (id) {
    var o = this.options;
    return path.resolve(o.root, o.viewsDir, id, "template" + o.extension);
  }