re-emitter

WebJar for re-emitter

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

re-emitter
Last Version

Last Version

1.1.3
Release Date

Release Date

Type

Type

jar
Description

Description

re-emitter
WebJar for re-emitter
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/feross/re-emitter

Download re-emitter

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/re-emitter/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>re-emitter</artifactId>
    <version>1.1.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/re-emitter/
implementation 'org.webjars.npm:re-emitter:1.1.3'
// https://jarcasting.com/artifacts/org.webjars.npm/re-emitter/
implementation ("org.webjars.npm:re-emitter:1.1.3")
'org.webjars.npm:re-emitter:jar:1.1.3'
<dependency org="org.webjars.npm" name="re-emitter" rev="1.1.3">
  <artifact name="re-emitter" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='re-emitter', version='1.1.3')
)
libraryDependencies += "org.webjars.npm" % "re-emitter" % "1.1.3"
[org.webjars.npm/re-emitter "1.1.3"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

re-emitter travis npm downloads javascript style guide

Re emit events from another emitter

reemit

Sauce Test Status

Works in node and the browser with browserify.

js-standard-style

install

npm install re-emitter

usage

var reemit = require('re-emitter')

var emitter = new EventEmitter()
var other = new EventEmitter()

reemit(emitter, other, ['foo', 'bar'])

other.on('foo', function () {
  // foo will fire on other emitter!
})

emitter.emit('foo')

other.on('baz', function () {
  // baz will not fire on other emitter
})

emitter.emit('baz')

canceling re-emitting

reemit returns a function, which when called, cancels all re-emitting by removing the event listeners which it added.

contributors

  • Raynos
  • Feross

license

MIT. Copyright (c) Raynos.

Versions

Version
1.1.3