<commit_before># Emitter

> A modern event emitter implementation.

Emitter.js is an event emitter based on the [Node EventEmitter](https://nodejs.org/api/events.html) but utilizing many of the new features in [ECMAScript](http://www.ecmascript.org/) 6.

## Installation

### Git

`git clone https://github.com/jeffrose/event-emitter event-emitter`

### NPM

`npm install emitter-js`

### Bower

`bower install emitter-js`

## Documentation

* [API](docs/api.md)

## Examples

```javascript
var greeter = new Emitter();
greeter.on( 'hello', ( name ) => console.log( `Hello, ${ name }!` ) );
greeter.emit( 'hello', 'World' );
// Hello, World!
```

```javascript
var greeter = new Emitter();
greeter.on( 'greeting:hello', ( name ) => console.log( `Hello, ${ name }!` ) );
greeter.on( 'greeting:hi', ( name ) => console.log( `Hi, ${ name }!` ) );
greeter.on( 'greeting', ( name ) => console.log( `${ name } was greeted.` );
greeter.emit( 'greeting:hi', 'Mark' );
// Hi, Mark!
// Mark was greeted.
greeter.emit( 'greeting:hello', 'Jeff' );
// Hello, Jeff!
// Jeff was greeted.
```

```javascript
var greetings = {
 hello: function( name ){ console.log( `Hello, ${name}!` ),
 hi: function( name ){ console.log( `Hi, ${name}!` )
};
var greeter = new Emitter( greetings );
greeter.emit( 'hello', 'Aaron' );
// Hello, Aaron!
```

```javascript
var greeter = new Emitter();
greeter.once( 'hello', ( name ) => console.log( `Hello, ${ name }!` ) );
greeter.emit( 'hello', 'Jeff' );
// Hello, Jeff!
greeter.emit( 'hello', 'Terry' );
```

```javascript
var greeter = new Emitter();
greeter.many( 'hello', 2, ( name ) => console.log( `Hello, ${ name }!` ) );
greeter.emit( 'hello', 'Jeff' );     // 1
// Hello, Jeff!
greeter.emit( 'hello', 'Terry' );    // 2
// Hello, Terry!
greeter.emit( 'hello', 'Steve' );    // 3
```<commit_msg>Cleaned up the README.<commit_after># Emitter

> A modern event emitter implementation.

Emitter.js is an event emitter based on the Node [EventEmitter](https://nodejs.org/api/events.html) but utilizing many of the new [features](https://github.com/lukehoban/es6features) in [ECMAScript](http://www.ecmascript.org/) 6.

## Installation

### Git

`git clone https://github.com/jeffrose/emitter emitter`

### NPM

`npm install emitter-js`

### Bower

`bower install emitter-js`

## Documentation

* [API](docs/api.md)

## Examples

```javascript
import Emitter from '../node_modules/emitter-js/dist/emitter';

let greeter = new Emitter();

greeter.on( 'hello', ( name ) => console.log( `Hello, ${ name }!` ) );
greeter.emit( 'hello', 'World' );
// Hello, World!
```
{'fraction_non_alphanumeric': 0.20526723470178157, 'fraction_numerical': 0.002711076684740511, 'mean_word_length': 4.114851485148515, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, 'https://': 5, 'lorem ipsum': 0, 'www.': 2, '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': '4833436', 'n_tokens_mistral': 947, 'n_tokens_neox': 908, 'n_words': 239}