1.0.3 • Published 5 years ago

@yoando/repetition-counter v1.0.3

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

@YoanDo/repetition-counter

Repetition-counter

a short package to check words repetition in a sentence

Install

$ npm install @yoando/repetition-counter

Usage

const repCounter = require("@yoando/repetition-counter");

repCounter(string, caseInsensitive) caseInsensitive is true by default

repCounter("Pump up the jam, pump it up", true); //=> { pump: 2, up: 2, the: 1, jam: 1, it: 1 }

repCounter("Pump up the jam, pump it up", false); //=> { Pump: 1, up: 2, the: 1, jam: 1, pump: 1, it: 1 }