Global

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.

Source:

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 -1 if the first argument scores less than the second argument, 1 if the first argument scores more than the second argument, and 0 if the scores are equal.

Source:
Returns:
  • The array, sorted.
Type
Array