Returns the number of words contained in the input text.
countWords(); // => 0
countWords(''); // => 0
countWords(' ') // => 0
countWords('Hello World') // => 2
countWords('Hello World !!') // => 2
Aliases
import countWords from '@plexis/count-words';
import {countWords} from 'plexis';