{"_id":"safe-event-emitter","_rev":"4642460","name":"safe-event-emitter","description":"An `EventEmitter` that isolates the emitter from errors in handlers. If an error is thrown in a handler it is caught and re-thrown inside of a `setTimeout` so as to not interupt the emitter's code flow.","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"danfinlay","email":"dan@danfinlay.com"},{"name":"gudahtt","email":"markjstacey@gmail.com"},{"name":"kumavis","email":"aaron@kumavis.me"},{"name":"metamaskbot","email":""}],"time":{"modified":"2026-04-10T20:03:44.000Z","created":"2018-10-04T03:57:38.756Z","1.0.1":"2018-10-04T04:07:39.602Z","1.0.0":"2018-10-04T03:57:38.756Z"},"users":{},"author":"","versions":{"1.0.1":{"name":"safe-event-emitter","version":"1.0.1","description":"An `EventEmitter` that isolates the emitter from errors in handlers. If an error is thrown in a handler it is caught and re-thrown inside of a `setTimeout` so as to not interupt the emitter's code flow.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"ISC","dependencies":{"events":"^3.0.0"},"gitHead":"f7677f607782b22ef66a5935a0ff33a6d4de97bb","_id":"safe-event-emitter@1.0.1","_npmVersion":"6.4.1","_nodeVersion":"8.11.3","_npmUser":{"name":"kumavis","email":"aaron@kumavis.me"},"dist":{"shasum":"5b692ef22329ed8f69fdce607e50ca734f6f20af","size":1448,"noattachment":false,"key":"/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/safe-event-emitter/download/safe-event-emitter-1.0.1.tgz"},"maintainers":[{"name":"danfinlay","email":"dan@danfinlay.com"},{"name":"gudahtt","email":"markjstacey@gmail.com"},{"name":"kumavis","email":"aaron@kumavis.me"},{"name":"metamaskbot","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/safe-event-emitter_1.0.1_1538626059446_0.4663480346239586"},"_hasShrinkwrap":false,"publish_time":1538626059602,"deprecated":"Renamed to @metamask/safe-event-emitter","_cnpm_publish_time":1538626059602,"_cnpmcore_publish_time":"2021-12-16T17:14:51.427Z"},"1.0.0":{"name":"safe-event-emitter","version":"1.0.0","description":"An `EventEmitter` that isolates the emitter from errors in handlers. If an error is thrown in a handler it is caught and re-thrown inside of a `setTimeout` so as to not interupt the emitter's code flow.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"ISC","dependencies":{"events":"^3.0.0"},"gitHead":"30962c8f8c92ff08260bebea38d00404c8858928","_id":"safe-event-emitter@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.11.3","_npmUser":{"name":"kumavis","email":"aaron@kumavis.me"},"dist":{"shasum":"18d90b5d74419e63a239a75f9e4d11fd6f36a3a0","size":1420,"noattachment":false,"key":"/safe-event-emitter/-/safe-event-emitter-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/safe-event-emitter/download/safe-event-emitter-1.0.0.tgz"},"maintainers":[{"name":"danfinlay","email":"dan@danfinlay.com"},{"name":"gudahtt","email":"markjstacey@gmail.com"},{"name":"kumavis","email":"aaron@kumavis.me"},{"name":"metamaskbot","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/safe-event-emitter_1.0.0_1538625458529_0.7827846516543013"},"_hasShrinkwrap":false,"publish_time":1538625458756,"deprecated":"Renamed to @metamask/safe-event-emitter","_cnpm_publish_time":1538625458756,"_cnpmcore_publish_time":"2021-12-16T17:14:51.652Z"}},"readme":"# safe-event-emitter\n\nAn `EventEmitter` that isolates the emitter from errors in handlers. If an error is thrown in a handler it is caught and re-thrown inside of a `setTimeout` so as to not interupt the emitter's code flow.\n\nAPI is the same as `EventEmitter`.\n\n### usage\n\n```js\nconst SafeEventEmitter = require('safe-event-emitter')\n\nconst ee = new SafeEventEmitter()\nee.on('boom', () => { throw new Error() })\nee.emit('boom') // no error here\n\n// error is thrown after setTimeout\n```\n","_attachments":{},"license":"ISC"}