transmitter

WebJar for transmitter

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

transmitter
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

transmitter
WebJar for transmitter
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/goatslacker/transmitter

Download transmitter

How to add to project

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

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.

transmitter

Dead simple pub-sub

API

subscribe(onChange: () => any): { dispose: () => void }

Subscribes to change events. Returns an object which contains the method dispose which removes the current subscription.

publish(...payload: any): void

Emit a change to all the subscribers.

Example

const bus = transmitter()

bus.subscribe(result => console.log(result))

bus.publish({ foo: 'bar' })

License

MIT

Versions

Version
1.0.2