Manage and call change listeners
$ npm install --save ear
var Listeners = require('ear')
var listeners = Listeners()
listeners.add(function (a, b) {
//=> hello
//=> world
})
listeners('hello', 'world')
Create a new listener group. Returns a listeners
function that will call all listeners with the provided arguments.
Adds a new listener. Returns a remove
function that will remove the new listener when called.
Required
Type: function
A listener to trigger when the parent function is called.
- async-ear: asynchronous version
MIT © Ben Drucker