
class MyEvent{
	static list = []
	add(name,call){
		MyEvent.list.push({name,call})
	}
	remove(name,call){
		MyEvent.list.filter(item=>item.name!=name&&item.call!=call)
	}
	emit(name,data){
		MyEvent.list.forEach(item => {
			if(item.name == name)item.call(data)
		});
	}
}
export default new MyEvent()