emittery 2.x
Use Emittery 2.x for asynchronous typed event emission, subscriptions, one-shot waits, async iterables, and listener lifecycle management.
- For
emittery@2.0.0- Verified
- 2026-09-08, 9 examples executed
- Package
@modootoday/pmcp-emittery@2.0.0
What it covers
- Version and runtime
- Critical v2 migration rule
- Basic subscription and removal
- One-shot listeners
- Concurrent and serial emission
- Async event streams
- Any-event listeners and listener inspection
- Other documented API
- Not covered
One example from this skill
This is the skill's own text, not a summary of it. It runs: that is what verifying means here.
import Emittery from 'emittery';
import assert from 'node:assert/strict';
const emitter = new Emittery();
const received: unknown[] = [];
const listener = ({name, data}: {name: string; data: unknown}) => {
received.push([name, data]);
};
const off = emitter.on('message', listener);
await emitter.emit('message', 'hello');
off();
await emitter.emit('message', 'ignored');
assert.deepEqual(received, [['message', 'hello']]);
What it did in the sandbox
Verifying this skill meant installing the package and running code against it with no route out. Nothing was observed. The full ledger lists every package examined, including the ones that never became a skill.
Nothing observed is not a finding of safety. It means one run, under one policy, produced nothing to report.
Getting it
With a subscription:
npx -y @modootoday/pmcp login
npx -y @modootoday/pmcp install @modootoday/pmcp-emittery
It installs as a dev dependency of your project, and the MCP server finds it there like any other skill.