@pierretrolle/words-counter

2.0.0 • Public • Published

Words Counter

A library to count words' occurrence

Install

yarn add @pierretrolle/words-counter

Usage

var wordsCounter = require('@pierretrolle/words-counter');

wordsCounter('This is a text with some text double occurrences.');

Results:

  {
    "double": 1,
    "is": 1,
    "occurrences": 1,
    "some": 1,
    "text": 2,
    "this": 1,
    "with": 1
  }

Init environment for development

# install Yarn
npm install -g yarn@1.10.1

Build Setup

# install dependencies
yarn

Lint and Test

# start linter
yarn lint

# fix linter errors
yarn lint:fix

# run all tests
yarn test

# run all tests in watch mode
yarn test:watch

Package Sidebar

Install

npm i @pierretrolle/words-counter

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

192 kB

Total Files

12

Last publish

Collaborators

  • pierretrolle