Nodejs Emit Event da classe
const EventEmitter = require('events');
module.exports = class animal extends EventEmitter {
constructor(){
super();
}
sound(){
this.emit('sound', `miau`);
}
}
PerryGamerPT