object-emitter
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
387987
104
0
63
5147