Renders resource tables for food, clothing and shelter.
- Source:
Methods
(inner) capitalizeFirstLetter(s)
Capitalize the first letter of a string
Parameters:
Name | Type | Description |
---|---|---|
s |
string | String to capitalize |
- Source:
Returns:
The string with its first letter capitlalized
(inner) mapDataToRows(data)
Maps data from an array of objects to rows in a table. Includes special handling for website links (generates hyperlink) and physical addresses (generates Google Maps link)
Parameters:
Name | Type | Description |
---|---|---|
data |
Array | An array of data objects, each element represents a row in the table |
- Source:
Returns:
Table rows (tr) which contain table data (td) tags
(inner) mapHeaderToColumns(headers)
Generates table headers/column names based on keys of a data object inthat table
Parameters:
Name | Type | Description |
---|---|---|
headers |
Object | Some data object in the table |
- Source:
Returns:
Table heading tags (th)