Methods
(inner) queryToObj(string) → {Object}
- Description:
takes a raw querystring input and converts it to an object
- Source:
Parameters:
Name | Type | Description |
---|---|---|
string |
String | querystring to parse into an object |
Returns:
- Type
- Object
(inner) objToQuery(obj) → {String}
- Description:
Converts the input object to url querystring
- Source:
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object | object with kvp to convert into a querystring |
Returns:
querystring
- Type
- String
(inner) isValidUrl(str) → {Boolean}
- Description:
Checks if the given string is a valid URL Must begin with ftp/http/https
- Source:
Parameters:
Name | Type | Description |
---|---|---|
str |
String | any string to check if it's a valid url |
Returns:
- Type
- Boolean
(inner) getURLParam(paramKey) → (nullable) {string}
- Description:
Gets the value for the URL parameter, if it's available. Can be safely called on platforms without a global document object, in which case this always returns null.
- Source:
Example
for www.test.com/?x=1&y=2
getURLParam('x') // 1
getURLParam('y') // 2
Parameters:
Name | Type | Description |
---|---|---|
paramKey |
String | a url param key |
Returns:
- value for the url parameter
- Type
- string