new URL()
- Since:
-
- 3.5.0
Methods
-
<static> appendQuery(url, param, value)
-
Appends content to the query string of a URL, handling logic for whether to place a question mark or ampersand.
Parameters:
Name Type Description urlString The URL to append to.
paramString The parameter key to append to the URL.
valueObject The parameter value to append to the URL.
- Since:
-
- 3.5.0
- See:
Throws:
-
for Invalid URL or empty arguments
- Type
- TypeError
Returns:
The resulting URL
- Type
- String
-
<static> isValidURL(url)
-
Returns
trueif the passed string is a valid URL,falseotherwise.Example Usage:
mindsmine.URL.isValidURL("http://userid@example.com") // true mindsmine.URL.isValidURL("www.example.com/main.html") // falseParameters:
Name Type Description urlString to check
- Since:
-
- 3.5.0
- See:
Returns:
if the string is a valid URL
- Type
- Boolean