Removed status bar, replaced with Show: Stats command

This commit is contained in:
Zef Hemel
2022-08-01 11:04:48 +02:00
parent 525b30c9bb
commit ec7c272594
6 changed files with 30 additions and 42 deletions
-10
View File
@@ -1,13 +1,3 @@
export function countWords(str: string): number {
const matches = str.match(/[\w\d\'-]+/gi);
return matches ? matches.length : 0;
}
export function readingTime(wordCount: number): number {
// 225 is average word reading speed for adults
return Math.ceil(wordCount / 225);
}
export function safeRun(fn: () => Promise<void>) {
fn().catch((e) => {
console.error(e);