29 lines
315 B
Plaintext
29 lines
315 B
Plaintext
# mutter
|
|
|
|
Mutter is a super-simple event emitter.
|
|
|
|
## Installation
|
|
|
|
$ npm install mutter --save
|
|
|
|
## Example
|
|
|
|
```js
|
|
var evt = require('mutter');
|
|
|
|
function foo(val) {
|
|
// ...
|
|
}
|
|
|
|
evt.on('foo', foo);
|
|
|
|
evt.one('foo', 'bar'); // emit one
|
|
evt.emit('foo', 'baz'); // emit all
|
|
|
|
evt.off('foo', foo)
|
|
```
|
|
|
|
## License
|
|
|
|
MIT
|