A promise-based event emitter