event-emitter
Advanced tools
Comparing version 0.3.1 to 0.3.2
{ | ||
"name": "event-emitter", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Environment agnostic event emitter", | ||
@@ -20,12 +20,16 @@ "author": "Mariusz Nowak <medyk@medikoo.com> (http://www.medikoo.com/)", | ||
"dependencies": { | ||
"es5-ext": "~0.10.2", | ||
"es5-ext": "~0.10.5", | ||
"d": "~0.1.1" | ||
}, | ||
"devDependencies": { | ||
"tad": "~0.1.21" | ||
"tad": "0.2", | ||
"xlint": "~0.2.2", | ||
"xlint-jslint-medikoo": "~0.1.2" | ||
}, | ||
"scripts": { | ||
"lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", | ||
"lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", | ||
"test": "node ./node_modules/tad/bin/tad" | ||
}, | ||
"licence": "MIT" | ||
"license": "MIT" | ||
} |
@@ -39,4 +39,4 @@ # event-emitter | ||
Whether there are any listeners attached to the object. | ||
If `name` is provided, it checks whether are there any listeners attached for specific event | ||
Whether object has some listeners attached to the object. | ||
When `name` is provided, it checks listeners for specific event name | ||
@@ -59,11 +59,11 @@ ```javascript | ||
#### pipe(source, target/*, emitMethodName*/) _(event-emitter/pipe)_ | ||
#### pipe(source, target[, emitMethodName]) _(event-emitter/pipe)_ | ||
Pipes all events from _source_ emitter onto _target_ emitter (all events from _source_ emitter will be emitted also on _target_ emitter, but not other way). | ||
Returns _pipe_ object which exposes `pipe.close` function. Invoke it to close configured _pipe_. | ||
It works internally by redefinition of `emit` method, if in your interface this method is referenced differenetly, provide its name (or symbol) with third argument. | ||
It works internally by redefinition of `emit` method, if in your interface this method is referenced differently, provide its name (or symbol) with third argument. | ||
#### unify(emitter1, emitter2) _(event-emitter/unify)_ | ||
Unifies event handling for two objects. Events emitted on _emitter1_ would be also emitter on _emitter2_, and other way back, events emitter on _emitter2_ would be emitter on _emitter1_ (both objects share same listeners collection). | ||
Unifies event handling for two objects. Events emitted on _emitter1_ would be also emitter on _emitter2_, and other way back. | ||
Non reversible. | ||
@@ -95,5 +95,4 @@ | ||
### Tests [![Build Status](https://travis-ci.org/medikoo/event-emitter.png)](https://travis-ci.org/medikoo/event-emitter) | ||
### Tests [![Build Status](https://secure.travis-ci.org/medikoo/event-emitter.png?branch=master)](https://secure.travis-ci.org/medikoo/event-emitter) | ||
$ npm test |
@@ -8,3 +8,3 @@ 'use strict'; | ||
return { | ||
"Any": function (a) { | ||
Any: function (a) { | ||
a(t(true), false, "Primitive"); | ||
@@ -23,3 +23,3 @@ a(t({ events: [] }), false, "Other object"); | ||
}, | ||
"Specific": function (a) { | ||
Specific: function (a) { | ||
a(t(true, 'test'), false, "Primitive"); | ||
@@ -26,0 +26,0 @@ a(t({ events: [] }, 'test'), false, "Other object"); |
@@ -83,3 +83,3 @@ 'use strict'; | ||
}, | ||
"Many": function (a) { | ||
Many: function (a) { | ||
var x = {}, y = {}, z = {}, count, count2, count3; | ||
@@ -86,0 +86,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
26003
3
96
Updatedes5-ext@~0.10.5