nodeUrlMod

object nodeUrlMod
class Object
trait Matchable
class Any

Type members

Classlikes

@JSImport("node:url", "URL") @native @JSType
class URL extends URL_
@JSImport("node:url", "URLSearchParams") @native @JSType

Value members

Concrete methods

@inline
def domainToASCII(domain: String): String
@inline
def domainToUnicode(domain: String): String
@inline
def fileURLToPath(url: URL_): String
@inline
def fileURLToPath(url: String): String

This function ensures the correct decodings of percent-encoded characters as well as ensuring a cross-platform valid absolute path string.

This function ensures the correct decodings of percent-encoded characters as well as ensuring a cross-platform valid absolute path string.

Value Params
url

The file URL string or URL object to convert to a path.

@inline
def format(URL: URL_): String
@inline
def format(URL: URL_, options: URLFormatOptions): String
@inline
def format(urlObject: UrlObject): String
@inline
def format(urlObject: String): String
@inline
def parse(urlStr: String): UrlWithStringQuery
@inline
def parse(urlStr: String, parseQueryString: Boolean): Url
@inline
def parse(urlStr: String, parseQueryString: Boolean, slashesDenoteHost: Boolean): Url
@inline
def parse(urlStr: String, parseQueryString: Unit, slashesDenoteHost: Boolean): UrlWithStringQuery
@inline
def parse_false(urlStr: String, parseQueryString: `false`): UrlWithStringQuery
@inline
def parse_false(urlStr: String, parseQueryString: `false`, slashesDenoteHost: Boolean): UrlWithStringQuery
@inline
def parse_true(urlStr: String, parseQueryString: `true`): UrlWithParsedQuery
@inline
def parse_true(urlStr: String, parseQueryString: `true`, slashesDenoteHost: Boolean): UrlWithParsedQuery
@inline
def pathToFileURL(url: String): URL_

This function ensures that path is resolved absolutely, and that the URL control characters are correctly encoded when converting into a File URL.

This function ensures that path is resolved absolutely, and that the URL control characters are correctly encoded when converting into a File URL.

Value Params
url

The path to convert to a File URL.

@inline
def resolve(from: String, to: String): String

Concrete fields

@JSImport("node:url") @native
val ^: Any