count2word
Calculate the number of occurrences of each word in a text. Words less than two letters are ignored.
Installation
$ npm i -S count2word
Example
const count2Word = ; console;// => { we: 1, travel: 1, not: 2, to: 2, escape: 2, life: 2, but: 1, for: 1, us: 1 }
Tests
-
clone the repository
-
install mocha and chai
$ npm i
- launch the tests
$ npm run test