Nodejs Emit Event из класса
const EventEmitter = require('events');
module.exports = class animal extends EventEmitter {
constructor(){
super();
}
sound(){
this.emit('sound', `miau`);
}
}
PerryGamerPT