Common functions used in the Typhoon components and framework.
To install the library, type:
npm install typhoon-common-functions
or
yarn add typhoon-common-functions
The functions are divided into a number of different files, each of which contains a category of function.
Extracts different properties passed as properties to a screen or component. If passed to a screen, the functions extract the properties from the screenView property.
Handles the saving, deleting, and reading of cookie values.
Compares different objects and arrays to see if they are equal or comparable to one another.
Converts data between different forms.
Filters objects and arrays in different ways.
Organises objects and arrays in different ways.
Performs date conversions, including finding relative periods to the current period.
Exports data into different file types.
Handles the saving, erasing, and reading of data from local storage.
Logs different debugging information to the console.
Handles the saving and reading of input information from the input reducer in the Redux store.
Handles the saving and reading of status information from the status reducer in the Redux store.
Displays information about functions and components in a graphical way.
Returns default sizes and colours for components, along with reading style information from the styling reducer in the Redux store.
Miscellaneous functions performing simple operations such as changing case or rounding numbers.
You can view the functions on Storybook here.