Markdown
/ API ReferenceMarkdown
/ API ReferencegetReadingDuration
Return the average reading duration of a markdown string in minutes.
It uses getWordCount under the hood.
The Gist
import { getReadingDuration } from '@weser/markdown'
const markdown = `some markdown text...`
const duration = getReadingDuration(markdown)
Parameters
| Parameter | Type | Description |
|---|---|---|
| markdown | string | The markdown string to get the reading duration for. |
Returns
(number) The reading duration in minutes.
© 2024-present Robin Weser. All Rights Reserved.