d
Amit DhamuSoftware Engineer
 

Read Time in minutes

1 minute read 00000 views

Here's a super simple function to determine how long a piece of text takes to read. This assumes the average adult reads 200 words per minute.

const readTime = (content: string): number =>
  Math.ceil(content.split(' ').length / 200)