<commit_before>combo-breaker
=============

Break consecutive repetition of a string in Node.js and browsers.<commit_msg>Add documentation to README<commit_after>combo-breaker
=============

Break consecutive repetition of a string in Node.js and browsers.


Examples
--------

```js
var comboBreaker = require('combo-breaker'),
    redundant,
    broken
;

redundant = 'I really really really really love pizza.';

broken = comboBreaker(redundant, 'really ');
console.log(broken); // "I really love pizza."

broken = comboBreaker(redundant, 'really ', { keep: 2 });
console.log(broken); // "I really really love pizza."

```


API
---

### comboBreaker(str, combo[, options]) ###

Searches string `str` for consecutive repetitions of `combo` and returns a copy of `str` with the repetitions replaced by a single `combo`. Use `options.keep` (`integer`) to keep more than one (or no) `combo`.


Install
-------

Install with [npm](https://www.npmjs.org/):

```
npm install combo-breaker
```


License
-------

ISC
{'fraction_non_alphanumeric': 0.16798418972332016, 'fraction_numerical': 0.0009881422924901185, 'mean_word_length': 3.965686274509804, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1476715', 'n_tokens_mistral': 337, 'n_tokens_neox': 296, 'n_words': 104}