Methods
hostname(hostname) → {UrlPattern}
Sets the hostname for the URL pattern.
Parameters:
Name | Type | Description |
---|---|---|
hostname | string | The hostname to set. |
- Source
Returns:
- Returns the updated instance of the URL pattern for chaining.
- Type:
- UrlPattern
pathname(pathname) → {UrlPattern}
Sets the pathname for the URL pattern.
Parameters:
Name | Type | Description |
---|---|---|
pathname | string | The pathname to set. |
- Source
Returns:
- Returns the updated instance of the URL pattern for chaining.
- Type:
- UrlPattern
port(port) → {UrlPattern}
Sets the port for the URL pattern.
Parameters:
Name | Type | Description |
---|---|---|
port | number | The port number to set. |
- Source
Throws:
- Throws an error if the port is not a number.
- Type
- Error
Returns:
- Returns the updated instance of the URL pattern for chaining.
- Type:
- UrlPattern
protocol(protocol) → {UrlPattern}
Sets the protocol for the URL pattern.
Parameters:
Name | Type | Description |
---|---|---|
protocol | string | The protocol to set. |
- Source
Returns:
- Returns the updated instance of the URL pattern for chaining.
- Type:
- UrlPattern
search(search) → {UrlPattern}
Sets the search parameter in the URL pattern.
Parameters:
Name | Type | Description |
---|---|---|
search | string | The search parameter to be set. |
- Source
Returns:
- Returns the updated instance of the URL pattern for chaining.
- Type:
- UrlPattern