Git Good #1: Rewriting History
by @jaasonw
May 23, 2022 • 1 min read
export function readingTime(blogContent: string, wpm = 225) {
// Regex taken from https://stackoverflow.com/a/5002161
const text = blogContent.replace(/<\/?[^>]+(>|$)/, '').trim();
return Math.ceil(text.split(/\s+/).length / wpm);
}
asdasdasfdf asdasff
asdasdasd as