<commit_before># ensemble
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Dependency Status][david-image]][david-url]
[![Downloads][downloads-image]][downloads-url]

Event listener orchestration. Makes it easy to bulk unbind listeners that were
set withing a context. This is especially useful for unmounting listeners in
React's `componentWillUnmount` lifecycle event.

## Installation
```bash
$ npm i --save ensemble
```

## Overview
```js
var Emitter = require('events').EventEmitter;
var ensemble = require('ensemble');

/**
 * Wrap an event emitter.
 */

var emitter = ensemble(new Emitter);

/**
 * Attach listeners to the emitter.
 */

emitter.on('foo', function() {});

/**
 * Remove all listeners registered
 * in the wrapper from the emitter.
 */

emitter.removeListeners()
```

## API
#### var emitter = ensemble(Emitter)
Wrap an event emitter in an ensemble object.
```js
var Emitter = require('events').EventEmitter;
var ensemble = require('ensemble');

var myEmitter = ensemble(new Emitter);
```

#### .on(event, cb)
Attach an event listener to the wrapped emitter. Behaves identical to Node's
built in listener function.
```js
myEmitter.on('some_event', function(val) {
  console.log(val);
});
```

#### .removeListeners()
Remove all listeners that were attached within this context to the emitter.
```js
myEmitter.removeListeners();
```

## License
[MIT](https://tldrlegal.com/license/mit-license) ©
[<NAME>](yoshuawuyts.com)

[npm-image]: https://img.shields.io/npm/v/ensemble.svg?style=flat-square
[npm-url]: https://npmjs.org/package/ensemble
[travis-image]: https://img.shields.io/travis/yoshuawuyts/ensemble.svg?style=flat-square
[travis-url]: https://travis-ci.org/yoshuawuyts/ensemble
[coveralls-image]: https://img.shields.io/coveralls/yoshuawuyts/ensemble.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/yoshuawuyts/ensemble?branch=master
[david-image]: http://img.shields.io/david/yoshuawuyts/ensemble.svg?style=flat-square
[david-url]: https://david-dm.org/yoshuawuyts/ensemble
[downloads-image]: http://img.shields.io/npm/dm/ensemble.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/ensemble
<commit_msg>readme: update<commit_after># ensemble
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Downloads][downloads-image]][downloads-url]

Event listener orchestration. Makes it easy to bulk unbind listeners that were
set withing a context. This is especially useful for unmounting listeners in
React's `componentWillUnmount` lifecycle event.

## Installation
```bash
npm install ensemble
```

## Overview
```js
var Emitter = require('events').EventEmitter;
var ensemble = require('ensemble');

/**
 * Wrap an event emitter.
 */

var emitter = ensemble(new Emitter);

/**
 * Attach listeners to the emitter.
 */

emitter.on('foo', function() {});

/**
 * Remove all listeners registered
 * in the wrapper from the emitter.
 */

emitter.removeListeners()
```

## API
#### var emitter = ensemble(Emitter)
Wrap an event emitter in an ensemble object.
```js
var Emitter = require('events').EventEmitter;
var ensemble = require('ensemble');

var myEmitter = ensemble(new Emitter);
```

#### .on(event, cb)
Attach an event listener to the wrapped emitter. Behaves identical to Node's
built in listener function.
```js
myEmitter.on('some_event', function(val) {
  console.log(val);
});
```

#### .removeListeners()
Remove all listeners that were attached within this context to the emitter.
```js
myEmitter.removeListeners();
```

## License
[MIT](https://tldrlegal.com/license/mit-license)

[npm-image]: https://img.shields.io/npm/v/ensemble.svg?style=flat-square
[npm-url]: https://npmjs.org/package/ensemble
[travis-image]: https://img.shields.io/travis/yoshuawuyts/ensemble.svg?style=flat-square
[travis-url]: https://travis-ci.org/yoshuawuyts/ensemble
[coveralls-image]: https://img.shields.io/coveralls/yoshuawuyts/ensemble.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/yoshuawuyts/ensemble?branch=master
[downloads-image]: http://img.shields.io/npm/dm/ensemble.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/ensemble

{'fraction_non_alphanumeric': 0.16448598130841122, 'fraction_numerical': 0.0, 'mean_word_length': 5.447289156626506, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 17, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3327498', 'n_tokens_mistral': 1505, 'n_tokens_neox': 1444, 'n_words': 318}