DocumentationAmertaThemeUtilitiesCalculate time to readFunctions
Calculate Time To Read
amerta / amerta/theme/utilities/calculate-time-to-read / calculateTimeToRead
Function: calculateTimeToRead()
calculateTimeToRead(
content):number
Defined in: amerta/theme/utilities/calculate-time-to-read.ts:8
Calculates the estimated time to read the provided content.
Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| content | any | The content object containing a root with children nodes. |
Returns
number
The estimated time to read in minutes.
Example
const minutes = calculateTimeToRead(myContent);