wc Word and character counter with line count
Examples
Count lines, words, and characters in a text
Usage
"The quick brown fox jumps
over the lazy dog.
A second paragr..." | wc Check word count on marketing copy for an ad character limit
Usage
"Our new product delivers outstanding performance with indust..." | wc Verify an essay meets the minimum word count requirement
Usage
"The impact of social media on modern communication has been ..." | wc View source
(input)=>{
const lines = input.split("\n").length;
const words = input.trim().split(/\s+/).filter(Boolean).length;
const chars = input.length;
const bytes = new Blob([
input
]).size;
const readingMin = Math.ceil(words / 238);
return ` Lines: ${lines.toLocaleString()}\n Words: ${words.toLocaleString()}\n Chars: ${chars.toLocaleString()}\n Bytes: ${bytes.toLocaleString()}\n ~Read: ${readingMin} min`;
}