Command line interface to get useful information from a chunk of text.
npm i -g @simboonlong/word-cli
or
npx -p @simboonlong/word-cli word <command> <arguments>
Example:
npx -p @simboonlong/word-cli word count 'foobar in hello world!'
The above word count should return 4.
Count total words.
word count 'foobar in hello world!'
Count total characters.
word count 'foobar in hello world!' --character
Count total occurrences of word in text.
word occur 'foobar in hello world!' --string foobar
Count total occurrences of character in text.
word occur 'foobar in hello world!' --string l --character