Event emitter for NodeJS and Browser