typhoon-common-functions
Common functions used in the Typhoon components and framework.
Installation
To install the library, type:
npm install typhoon-common-functions
or
yarn add typhoon-common-functions
Function Categories
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.
Cookie Manager
Handles the saving, deleting, and reading of cookie values.
Data Comparer
Compares different objects and arrays to see if they are equal or comparable to one another.
Data Converter
Converts data between different forms.
Data Filterer
Filters objects and arrays in different ways.
Data Organiser
Organises objects and arrays in different ways.
Date Operations
Performs date conversions, including finding relative periods to the current period.
Export
Exports data into different file types.
Local Storage Manager
Handles the saving, erasing, and reading of data from local storage.
Logger
Logs different debugging information to the console.
Saved Input
Handles the saving and reading of input information from the input reducer in the Redux store.
Saved Status
Handles the saving and reading of status information from the status reducer in the Redux store.
Storybook
Displays information about functions and components in a graphical way.
Style Manager
Returns default sizes and colours for components, along with reading style information from the styling reducer in the Redux store.
Utility Functions
Miscellaneous functions performing simple operations such as changing case or rounding numbers.
You can view the functions on Storybook here.