Helpers

Helpers

Source:

Helper functions

Methods

(static) formatImageURL(imgFileName, sizeopt, secureURLopt) → {Array.<string>}

Source:

Returns and array with one or more full URLs to an image.

Parameters:
Name Type Attributes Default Description
imgFileName string | Array.<string>

file name of the image or Array of filenames.

size string <optional>
m

's', *'m', 'l', 'original'.

secureURL boolean <optional>
true

return the https or http - *true

Returns:

full URL to the image

Type
Array.<string>

(static) parseToDate(dateString) → {object}

Source:

Parses passed date

Parameters:
Name Type Description
dateString string

date string to parse

Returns:
  • return object { date, // - javascript date format epoch, // - Unix epoch timestamp in seconds formatted // - Formatted date. Default "MM-dd-yyyy" or passed in main invokation }
Type
object

(static) flattenArray(arr, delimiter) → {string}

Source:

Flattens the passed array (only a single dimensional array) Used in the discover movie function

Parameters:
Name Type Default Description
arr array

array to flatten

delimiter string ,

string to delimit flattened array with

Returns:
  • Flat array
Type
string