You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Microscopic:** weighs less than 200 bytes gzipped
13
-
-**Useful:** a wildcard `"*"` event type listens to all events
14
-
-**Famliar:** same names & ideas as [Node's EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter)
15
-
-**Functional:** methods don't rely on `this`
16
-
-**Great Name:** somehow [mitt](https://npm.im/mitt) wasn't taken
11
+
-**Microscopic:** weighs less than 200 bytes gzipped
12
+
-**Useful:** a wildcard `"*"` event type listens to all events
13
+
-**Familiar:** same names & ideas as [Node's EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter)
14
+
-**Functional:** methods don't rely on `this`
15
+
-**Great Name:** somehow [mitt](https://npm.im/mitt) wasn't taken
17
16
18
-
> Mitt was made for the browser, but works in any JavaScript runtime. It has no dependencies and only uses basic language features. It probably works in Internet Explorer 5.
17
+
Mitt was made for the browser, but works in any JavaScript runtime. It has no dependencies and supports IE9+.
19
18
19
+
## Table of Contents
20
+
-[Install](#install)
21
+
-[Usage](#usage)
22
+
-[Examples & Demos](#examples--demos)
23
+
-[API](#api)
24
+
-[Contribute](#contribute)
25
+
-[License](#license)
20
26
21
-
* * *
27
+
## Install
22
28
29
+
This project uses [node](http://nodejs.org) and [npm](https://npmjs.com). Go check them out if you don't have them locally installed.
23
30
24
-
## Usage
31
+
```sh
32
+
$ npm install --save mitt
33
+
```
34
+
35
+
Then with a module bundler like [rollup](http://rollupjs.org/) or [webpack](https://webpack.js.org/), use as you would anything else:
36
+
37
+
```javascript
38
+
// using ES6 modules
39
+
importmittfrom'mitt'
40
+
41
+
// using CommonJS modules
42
+
var mitt =require('mitt')
43
+
```
44
+
45
+
The [UMD](https://github.com/umdjs/umd) build is also available on [unpkg](https://unpkg.com):
0 commit comments