Core. URL

URL Class is used to define address information.

Constructor

new URL()

Create a new one URL Example。

Member

(static) basePath :String

Basic path.
Default Value:
  • ""

(static) customFormat :function

Custom URL formatting. For example: customFormat = function (url:String): String{}

(static) rootPath :String

Root path.
Default Value:
  • ""

(static) version :Object

Version number.

path :String

Address path.

url :String

Formatted address.

Methods

formatURL(url, baseopt) → {String}

Format the specified address and return it.
Parameters:
Name Type Attributes Default Description
url String Address.
base String <optional>
null base Route。
Returns:
Type:
String
Address after formatting.

getFileName(url) → {String}

Get specified URL Filename.
Parameters:
Name Type Description
url String Address.
Returns:
Type:
String
URL Filename.