MongoDB interview question

Build the eventEmitter API found in the Node.js documentation