Simple event emitter for JS