one
function
one()
Option name | Type | Description |
---|---|---|
eventName | String | Name of event, one of listed above |
handler | Function | callback for event |
adds a one time listener to an event
Supported events:
add
→ (object, options)update
→ (object, options)remove
→ (object, options)change
→ (eventName, object, options)
function one (state, eventName, handler) {
state.emitter.once(eventName, handler)
return this
}