Socket
Book a DemoInstallSign in
Socket

object-emitter-only

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-emitter-only

Proxy object values to only expose emitter methods.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

object-emitter-only

NPM version build status Test coverage

Proxy object values to only expose emitter methods. Normalizes objects based off EventDispatcher. Leverages event-accessor and object-apply to do the transformation.

Installation

$ npm i --save object-emitter-only

Overview

var emitterProxy = require('object-emitter-only');
var Emitter = require('events').EventEmitter;

var impureObject = new Emitter();
impureObject.foo = 'strip me away!';

emitterProxy({
  foo: new Emitter(),
  bar: impureObject
});

// all values returned by `emitterProxy` now only expose `emitter` functions.

License

MIT © Yoshua Wuyts

Keywords

emitter

FAQs

Package last updated on 27 Sep 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts