mirror of
https://github.com/robonen/lorem-blog.git
synced 2026-03-20 10:54:38 +00:00
feat(tests): add comprehensive tests for utility functions and blog context
This commit is contained in:
@@ -10,6 +10,9 @@
|
||||
* console.log(time); // Outputs: 1
|
||||
*/
|
||||
export function calculateReadingTime(content: string) {
|
||||
if (!content || content.trim().length === 0)
|
||||
return 0;
|
||||
|
||||
const wordsPerMinute = 200;
|
||||
const words = content.split(/\s+/).length;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user