event-accessor
v1.1.2
Published
Proxy event dispatchers to only expose default functionality
Downloads
4
Readme
event-accessor
Proxy event dispatchers to only expose default functionality.
Installation
$ npm i --save event-accessor
Overview
var proxy = require('event-accessor');
var Emitter = require('events').EventEmitter;
var emitter = new Emitter;
var proxyEmitter = proxy(emitter);
API
event-accessor()
Wrap an event emmitter inside a event-accessor function, allowing only built-in methods to be exposed. Exposes all emitter functions.
var proxy = require('event-accessor');
var Emitter = require('events').EventEmitter;
var emitter = new Emitter;
var proxyEmitter = proxy(emitter);