Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
bratsos committed Jul 9, 2020
1 parent 37ee3b4 commit 0992f7c
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
<p align="center">
<h1>🍀 Irish PubSub - 133b pubsub system</h1>
<h1>🍀 Irish PubSub - 97b pubsub system</h1>
<br>
<a href="https://www.npmjs.org/package/irish-pub-sub"><a href="https://unpkg.com/irish-pub-sub/dist/index.min.umd.js"><img src="http://img.badgesize.io/https://unpkg.com/irish-pub-sub/dist/index.min.js?compression=gzip" alt="gzip size"></a> <a href="https://packagephobia.now.sh/result?p=irish-pub-sub"><img src="https://packagephobia.now.sh/badge?p=irish-pub-sub" alt="install size"></a>
<a href="https://unpkg.com/irish-pub-sub/dist/index.min.umd.js">
<img src="http://img.badgesize.io/https://unpkg.com/[email protected]/dist/index.min.js?compression=gzip" alt="gzip size">
</a>
<a href="https://unpkg.com/irish-pub-sub/dist/index.min.umd.js">
<img src="http://img.badgesize.io/https://unpkg.com/[email protected]/dist/index.min.js?compression=brotli" alt="brotli size">
</a>
<a href="https://packagephobia.now.sh/result?p=irish-pub-sub">
<img src="https://packagephobia.now.sh/badge?p=irish-pub-sub" alt="install size">
</a>
</p>


Modern (es6) functional Pubsub system (no `class`, or `this`), weights about 133b minified + gzipped.
Modern (es6) functional Pubsub system (no `class`, or `this`), weights about 97b minified + gzipped.

<h2>Install</h2>

Expand All @@ -22,8 +30,9 @@ import pubsub from 'irish-pub-sub'

const [subscribe, send] = pubsub()

const unsbuscribe = subscribe('The Dreadnoughts', (val) => console.log('The Dreadnoughts: ', val)) // returns unsubscribe method
const unsubscribe = subscribe('The Dreadnoughts', (val) => console.log('The Dreadnoughts: ', val)) // returns unsubscribe method
send('Dreadnoughts', 'Best band ever') // => The Dreadnoughts: Best band ever
unsubscribe() // => true
```

_Inspired by [developit/mitt](https://github.com/developit/mitt)_
Expand Down

0 comments on commit 0992f7c

Please sign in to comment.