Packages

object URL extends Object

This module has utilities for URL resolution and parsing. Call require('url') to use it.

Annotations
@native() @JSImport("url", JSImport.Namespace)
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. URL
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. def domainToASCII(domain: String): String

    Returns the Punycode ASCII serialization of the domain.

    Returns the Punycode ASCII serialization of the domain. If domain is an invalid domain, the empty string is returned.

    domain

    the domain

    returns

    the Punycode ASCII serialization of the domain

  7. def domainToUnicode(domain: String): String

    Returns the Unicode serialization of the domain.

    Returns the Unicode serialization of the domain. If domain is an invalid domain, the empty string is returned.

    domain

    the domain

    returns

    the Unicode serialization of the domain

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def fileURLToPath(url: String): String
  11. def fileURLToPath(url: URL): String
  12. def format(url: URL): String
  13. def format(url: URL, options: UrlFormatOptions): String

    Returns a customizable serialization of a URL String representation of a WHATWG URL object.

    Returns a customizable serialization of a URL String representation of a WHATWG URL object.

    url

    the given URL

    options

    the given options

    returns

    a customizable serialization of a URL String representation of a WHATWG URL object.

  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. def pathToFileURL(url: String): URL
  23. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  24. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  25. def toLocaleString(): String
    Definition Classes
    Object
  26. def toString(): String
    Definition Classes
    AnyRef → Any
  27. def urlToHttpOptions(url: URL): URLOptionsObject
  28. def valueOf(): Any
    Definition Classes
    Object
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  31. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  2. def format(urlObj: URLObject): String

    Take a parsed URL object, and return a formatted URL string.

    Take a parsed URL object, and return a formatted URL string.

    Annotations
    @deprecated
    Deprecated

    (Since version Node.js v11.0.0) Use URL instead

    Example:
    1. url.format(urlObj)

  3. def parse(urlStr: String): URLObject
    Annotations
    @deprecated
    Deprecated

    (Since version Node.js v11.0.0) Use URL instead

  4. def parse(urlStr: String, parseQueryString: Boolean): URLObject
    Annotations
    @deprecated
    Deprecated

    (Since version Node.js v11.0.0) Use URL instead

  5. def parse(urlStr: String, parseQueryString: Boolean, slashesDenoteHost: Boolean): URLObject

    Take a URL string, and return an object.

    Take a URL string, and return an object.

    Pass true as the second argument to also parse the query string using the querystring module. If true then the query property will always be assigned an object, and the search property will always be a (possibly empty) string. If false then the query property will not be parsed or decoded. Defaults to false.

    Pass true as the third argument to treat //foo/bar as { host: 'foo', pathname: '/bar' } rather than { pathname: '//foo/bar' }. Defaults to false.

    Annotations
    @deprecated
    Deprecated

    (Since version Node.js v11.0.0) Use URL instead

    Example:
    1. url.parse(urlStr[, parseQueryString][, slashesDenoteHost])

  6. def resolve(from: String, to: String): String

    Take a base URL, and a href URL, and resolve them as a browser would for an anchor tag.

    Take a base URL, and a href URL, and resolve them as a browser would for an anchor tag. Examples: url.resolve('/one/two/three', 'four') // '/one/two/four' url.resolve('http://example.com/', '/one') // 'http://example.com/one' url.resolve('http://example.com/one', '/two') // 'http://example.com/two'

    Annotations
    @deprecated
    Deprecated

    (Since version Node.js v11.0.0) Use URL instead

    Example:
    1. url.resolve(from, to)

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped