Methods
http(uri, optionsopt) → {Promise}
Perform a HTTP(S) request.
If the script is hosted on a HTTPS server, we cannot perform HTTP requests because of the Same Origin Policy. Therefore, this function falls back to HTTPS if HTTP fails.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
uri |
string | The URI to look up. |
|
options |
Object |
<optional> |
Request options. |
- Source:
Returns:
A promise.
- Type
- Promise
main()
Main method. Invoked when run from the command line.
sort(arr, fnopt) → {Array}
Stable sort, preserving the original order when possible.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arr |
Array | The array to sort. |
|
fn |
function |
<optional> |
A comparison function that returns
|
- Source:
Returns:
- The array, sorted.
- Type
- Array