async-node-events
Advanced tools
Changelog
2.0.0 - 2019-11-08
EventEmitter
is exported from module.
const {EventEmitter} = require('async-node-events');
import {EventEmitter} from 'async-node-events';
emit()
async function and resolve to true
/false
if
listeners were called rather than returning this
.on
, off
, etc) will
all be called in a sync manner, and must not return a Promise.emitSync
is now like emit
but only handles synchronous
listeners.emit
and emitSync
return false
when cancelled and
true
if not cancelled. This differs from Node.js API that indicates if
there were listeners. Use listenerCount
to check for listeners.off()
as alias for removeListener.listenerCount()
.onSync()
/ onceSync()
/ addListenerSync()
onAsync()
/ onceAsync()
/ addListenerAsync()