Function deno_core::resolve_url_or_path
source · pub fn resolve_url_or_path(
specifier: &str
) -> Result<ModuleSpecifier, ModuleResolutionError>
Expand description
Takes a string representing either an absolute URL or a file path, as it may be passed to deno as a command line argument. The string is interpreted as a URL if it starts with a valid URI scheme, e.g. ‘http:’ or ‘file:’ or ‘git+ssh:’. If not, it’s interpreted as a file path; if it is a relative path it’s resolved relative to the current working directory.