propagate

WebJar for propagate

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

propagate
Last Version

Last Version

0.4.0
Release Date

Release Date

Type

Type

jar
Description

Description

propagate
WebJar for propagate
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/pgte/propagate

Download propagate

How to add to project

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

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.

propagate

npm Build Status Coverage

Propagate events from one event emitter into another.

Install

$ npm install propagate

Propagate

const ee1 = new EventEmitter()
const ee2 = new EventEmitter()
propagate(ee1, ee2)

ee2.on('event', function(a, b) {
  console.log('got propagated event', a, b)
})

ee1.emit('event', 'a', 'b')

Unpropagate

You can unpropagate by ending the propagation like this:

const ee1 = new EventEmitter()
const ee2 = new EventEmitter()
const p = propagate(ee1, ee2)

// ...

p.end()

Only propagate certain events:

const ee1 = new EventEmitter()
const ee2 = new EventEmitter()
const p = propagate(['event1', 'event2'], ee1, ee2)

Propagate certain events as other events:

const ee1 = new EventEmitter()
const ee2 = new EventEmitter()
const p = propagate(
  {
    event1: 'other-event1',
    event2: 'other-event2',
  },
  ee1,
  ee2
)

License

MIT

Versions

Version
0.4.0