# module.exports()
# useCountDownRef(totalTime)
Uses ref
objects to store interval and timeout
Parameters
Name | Types | Description |
---|---|---|
totalTime |
|
countdown length in MS |
# useHashChange()
This is a custom hook that we have to use for any all all hash URL's. This is a very hacky solution but it works so we'll use it
# useIsClient()
This React Hook can be useful in a SSR environment to wait until be in a browser to execution some functions.
# queryParser(query)
Function used to handle any query that needs to get information for either the server or the client repo.
Parameters
Name | Types | Description |
---|---|---|
query |
|
- The URL query, should only ever be a single query |
# initializeFontAwesome()
Sets upFontAwesome
to be used in NextJS - sets autoAddCss
to false - adds all of the imported icons to the app library
# capitalize(str)
Capitalizes the first letter of an input string
Parameters
Name | Types | Description |
---|---|---|
str |
|
string to modify |
# checkIfElementInView(container, element)
Checks if a container's immediate child is in our out of the overflow view
Parameters
Name | Types | Description |
---|---|---|
container |
|
HTMLcontaining element |
element |
|
element in / out of view |
# chunkArray(array, chunkSize)
Takes in an array and a number to produce a new two dimmensional array. These smaller arrays have a max length equal to the input number
Parameters
Name | Types | Description |
---|---|---|
array |
|
source array to be chunked |
chunkSize |
|
the max number of elements to go in each new sub-array |
# isEmpty(obj)
Takes in an object and tests to see if this object is empty. - If the object has any proprties, returns false. - If the object when stringified equals "{}", returns true
Parameters
Name | Types | Description |
---|---|---|
obj |
|
object to test emptiness of |
# prettyPrint(obj)
Utility function to replace JSON.stringify(something, null, 2)
Parameters
Name | Types | Description |
---|---|---|
obj |
|
# printOutDate(dateIn)
Takes in any date like data and will transform it into a more human readable string.
Parameters
Name | Types | Description |
---|---|---|
dateIn |
|
any date like input that dayjs can parse |
# propertySet(arr, key)
Takes in an array of objects, and produces a new Set of a common object property value.
Parameters
Name | Types | Description |
---|---|---|
arr |
|
array of objects |
key |
|
string, key of object |