Spec
Implement the Emitter class in lib/emitter.js (contract in the doc comment).
Watch out for two classic traps:
- mutating the listener array while iterating it (a
once listener removes itself mid-emit)
off for once-listeners: the stored function is a wrapper, but the user passes the original