Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

object-emitter

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-emitter - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

lib/object-emitter.js

@@ -411,3 +411,3 @@ /**

// Ignore uncaught error events.
if( this._conf.throwErrors === false ) {
if( this._conf && this._conf.throwErrors === false ) {
return this

@@ -414,0 +414,0 @@ }

{
"name": "object-emitter",
"version": "0.1.2",
"version": "0.1.3",
"description": "EventEmitter with some useful additional functionality.",

@@ -10,2 +10,3 @@ "author": {

},
"main": "lib/object-emitter.js",
"contributors": [

@@ -12,0 +13,0 @@ {

@@ -5,8 +5,8 @@ ## Overview

- Convenience "mixin" method for easily adding Emitter to any object.
- All module methods (on, emit, off, etc) are chainable.
- Wildcard matching enabled by default.
- Extends existing EventEmitters by working with the _events property.
- Recognizes Node.js domain usage.
- Allows default "error" callback to avoid throwing "unspecified 'error' event" error.
* Convenience "mixin" method for easily adding Emitter to any object.
* All module methods (on, emit, off, etc) are chainable.
* Wildcard matching enabled by default.
* Extends existing EventEmitters by working with the _events property.
* Recognizes Node.js domain usage.
* Allows default "error" callback to avoid throwing "unspecified 'error' event" error.

@@ -55,2 +55,28 @@ ## Constructor Methods

The semi "traditional" way of injecting prototypes into new objects works like so:
```javascript
var ObjectEmitter = require('object-emitter');
function MyConstructor( options ) {
ObjectEmitter.call(this, {
delimiter: ':',
throwErrors: false
});
return this;
};
MyConstructor.prototype = Object.create( ObjectEmitter.prototype, {
constructor: { value: MyConstructor }
});
MyConstructor.prototype.someMethod = function() {}
```
## License

@@ -60,3 +86,3 @@

Copyright (c) 2013 Usability Dynamics, Inc. <info@usabilitydynamics.com>
Copyright (c) 2013-2014 Usability Dynamics, Inc. <info@usabilitydynamics.com>

@@ -63,0 +89,0 @@ Permission is hereby granted, free of charge, to any person obtaining

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc