Skip to content
Myr

Update docs.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jason Miller · committed by Jason Miller · parent d63b350 · Browse files · 2 files+23 added−19 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+23 added−19 removed

  • other:+23 added−19 removed

2 files+23 added−19 removed

modified:package.json+1 added-1 removed
modified:README.md+22 added-18 removed
15 unmodified lines
1617Mitt was made for the browser, but works in any JavaScript runtime. It has no dependencies and supports IE9+.1819## Table of Contents20- [Install](#install)21- [Usage](#usage)22- [Examples & Demos](#examples--demos)23- [API](#api)24- [Contribute](#contribute)25- [License](#license)2021- [Install](#install)22- [Usage](#usage)23- [Examples & Demos](#examples--demos)24- [API](#api)25- [Contribute](#contribute)26- [License](#license)2728## Install2930This project uses [node](http://nodejs.org) and [npm](https://npmjs.com). Go check them out if you don't have them locally installed.31
15 unmodified lines
4748```html49<script src="https://unpkg.com/mitt/dist/mitt.umd.js"></script>50```5152You can find the library on `window.mitt`.5354## Usage55
38 unmodified lines
94### mitt9596Mitt: Tiny (~200b) functional event emitter / pubsub.9796Returns **Mitt**98Returns **Mitt** 99100#### emit101102Invoke all handlers for the given type.
28 unmodified lines
131132Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the `mitt` instance for chaining133134## Contribute135136First off, thanks for taking the time to contribute!137Now, take a moment to be sure your contributions make sense to everyone else.138139### Reporting Issues140141Found a problem? Want a new feature? First of all see if your issue or idea has [already been reported](../../issues).142If don't, just open a [new clear and descriptive issue](../../issues/new).143144### Submitting pull requests145146Pull requests are the greatest contributions, so be sure they are focused in scope, and do avoid unrelated commits.147143- Fork it!144- Clone your fork: `git clone https://github.com/<your-username>/mitt`145- Navigate to the newly cloned directory: `cd mitt`146- Create a new branch for the new feature: `git checkout -b my-new-feature`147- Install the tools necessary for development: `npm install`148- Make your changes.149- Commit your changes: `git commit -am 'Add some feature'`150- Push to the branch: `git push origin my-new-feature`151- Submit a pull request with full remarks documenting your changes.148- Fork it!149- Clone your fork: `git clone https://github.com/<your-username>/mitt`150- Navigate to the newly cloned directory: `cd mitt`151- Create a new branch for the new feature: `git checkout -b my-new-feature`152- Install the tools necessary for development: `npm install`153- Make your changes.154- Commit your changes: `git commit -am 'Add some feature'`155- Push to the branch: `git push origin my-new-feature`156- Submit a pull request with full remarks documenting your changes.157158## License159155[MIT License](LICENSE.md) &copy; [Jason Miller](https://jasonformat.com/)156160[MIT License](LICENSE.md) © [Jason Miller](https://jasonformat.com/)