event name
Wait event once asynchronous
import { events } from '@biorate/tools';
(async () => {
const object = new EventEmitter();
const promise = events.once(object, 'test');
object.emit('test', 1, 2, 3);
const data = await promise;
console.log(data); [1, 2, 3]
})();
Generated using TypeDoc
Event object