open-index/open-npm huggingface dataset:
npm package: @mary-ext/simple-event-emitter
Description: A really simple event emitter
Latest version: 1.0.1

# simple-event-emitter

a really simple event emitter

```ts
type UserStatus = 'online' | 'away' | 'offline';

const userStatusChanged = new SimpleEventEmitter<[username: string, status: UserStatus]>();

const cleanup = userStatusChanged.subscribe((username, status) => {
	console.log(`@${username} is now ${status}`);
});

userStatusChanged.emit('mary', 'offline');
```