mufa
Version:
Event driven programming . Useful to separate layers (View, logic,...etc)
45 lines (31 loc) • 1.08 kB
Markdown
[](https://travis-ci.org/abdennour/mufa)
[](https://coveralls.io/github/abdennour/mufa?branch=master)
# Overview :
Mufa is an abbreviation of مُفَوَّضْ (Mufawwad) which is an arabic word and it means DELEGATOR.
It is designed to separate layers of your application via sub/pub pattern ; where there are two actors : Subscriber (listener) and publisher (notifier).
See [documetation](https://abdennour.github.io/mufa/) .
# Install
```bash
npm install mufa --save;
```
or, use as CDN :
```html
<script
src="https://rawgit.com/abdennour/mufa/master/cdn/mufa-latest.js"
type="text/javascript">
</script>
```
# Example :
```js
import {on, fire} from 'mufa';
// publish
setTimeout(() => {
fire('sendEmoji', '👏');
}, 1000) ;
// subscribe
on('sendEmoji', (emoji) => console.log(emoji));
```
#Documentation :
See [here](https://abdennour.github.io/mufa/) .
# License:
MIT .