1.1.0 • Published 6 years ago
@reed665/wordscount v1.1.0
wordscount
Simple function to help you count words in a text
Installation
npm i @reed665/wordscount
Usage
import wordscount from '@reed665/wordscount'
const text = 'Love to hate to love'
const textWordsCount = wordscount(text)
Object.keys(textWordsCount) // ['love', 'to', 'hate']
textWordsCount.love // 2
textWordsCount.to // 2
textWordsCount.hate // 1