Uniform Resource Identifier (Uri) http://tools.ietf.org/html/rfc3986. This class is a simple parser which creates the basic component paths (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation and encoding.

  foo://example.com:8042/over/there?name=ferret#nose
  \_/   \______________/\_________/ \_________/ \__/
   |           |            |            |        |
scheme     authority       path        query   fragment
   |   _____________________|__
  / \ /                        \
  urn:example:animal:ferret:nose

Hierarchy

  • Uri

Index

Properties

authority

authority: string

authority is the 'www.msft.com' part of 'http://www.msft.com/some/path?query#fragment'. The part between the first double slashes and the next slash.

fragment

fragment: string

fragment is the 'fragment' part of 'http://www.msft.com/some/path?query#fragment'.

fsPath

fsPath: string

Returns a string representing the corresponding file system path of this Uri. Will handle UNC paths and normalize windows drive letters to lower-case. Also uses the platform specific path separator. Will not validate the path for invalid characters and semantics. Will not look at the scheme of this Uri.

path

path: string

path is the '/some/path' part of 'http://www.msft.com/some/path?query#fragment'.

query

query: string

query is the 'query' part of 'http://www.msft.com/some/path?query#fragment'.

scheme

scheme: string

scheme is the 'http' part of 'http://www.msft.com/some/path?query#fragment'. The part before the first colon.

Methods

toJSON

  • toJSON(): any

toString

  • toString(skipEncoding?: boolean): string
  • Parameters

    • Optional skipEncoding: boolean

      Do not encode the result, default is false

    Returns string

with

  • with(change: object): Uri
  • Parameters

    • change: object
      • Optional authority?: string
      • Optional fragment?: string
      • Optional path?: string
      • Optional query?: string
      • Optional scheme?: string

    Returns Uri

Static file

  • file(path: string): Uri

Static from

  • from(components: object): Uri
  • Parameters

    • components: object
      • Optional authority?: string
      • Optional fragment?: string
      • Optional path?: string
      • Optional query?: string
      • Optional scheme?: string

    Returns Uri

Static isUri

  • isUri(thing: any): boolean

Static parse

  • parse(value: string): Uri

Static revive

  • revive(data: any): Uri