diff options
| author | tunnckoCore <[email protected]> | 2017-01-17 20:29:25 +0200 |
|---|---|---|
| committer | tunnckoCore <[email protected]> | 2017-01-17 20:29:25 +0200 |
| commit | e361ab520b96b8b0d1efa81b0a8aba916da6d144 (patch) | |
| tree | 8106fb77d3ffa72c10da4ff775252758a4914382 /README.md | |
| parent | db21ce5c5d7f8a78393cc8550edb88edd952b15a (diff) | |
resolve readme conflict
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 23 |
1 files changed, 16 insertions, 7 deletions
@@ -8,13 +8,22 @@ ## Why Mitt? -- **Microscopic:** weighs less than 200 bytes gzipped -- **Useful:** a wildcard `"*"` event type listens to all events -- **Familiar:** same names & ideas as [Node's EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter) -- **Functional:** methods don't rely on `this` -- **Great Name:** somehow [mitt](https://npm.im/mitt) wasn't taken +- **Microscopic:** weighs less than 200 bytes gzipped +- **Useful:** a wildcard `"*"` event type listens to all events +- **Familiar:** same names & ideas as [Node's EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter) +- **Functional:** methods don't rely on `this` +- **Great Name:** somehow [mitt](https://npm.im/mitt) wasn't taken -> 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. +> Mitt was made for the browser, but works in any JavaScript runtime. It has no dependencies and supports IE9+. + + +## Examples & Demos + +<a href="http://codepen.io/developit/pen/rjMEwW?editors=0110"> + <b>Preact + Mitt Codepen Demo</b> + <br> + <img src="https://i.imgur.com/CjBgOfJ.png" width="278" alt="preact + mitt preview"> +</a> * * * @@ -50,7 +59,7 @@ emitter.off('foo', onFoo) // unlisten Mitt: Tiny (~200b) functional event emitter / pubsub. -Returns **Mitt** +Returns **Mitt** #### emit |
