1.2.6 • Published 3 months ago

@reneos/pubsub v1.2.6

Weekly downloads
20
License
MIT
Repository
github
Last release
3 months ago

reneos.pubsub

install

npm i @reneos/pubsub --save

https://www.npmjs.com/package/@reneos/pubsub

This package is intended for messaging through a publication (shared bus). Channels have a tree structure and publishing in an inherited channel makes publishing in the parent channel.
const {PubSub} = import "@reneos/pubsub"

To subscribe to events, use :

const key = PubSub.Subscribe("my.path.sub",(data,path)=>{
  console.log(`On Publicate ${data.anyprop} `)
})

A subscription with an empty path will receive all events

To publish events, use :

PubSub.Publish("my.path",{anyprop:'anydata'})

Events will be published all the way, for example:

If you published an event along the path "my.path.sub" then the publication will be along the path "my.path.sub" and along the path "my.path" and "my"

1.2.6

3 months ago

1.2.5

2 years ago

1.2.0

3 years ago

1.2.3

3 years ago

1.2.1

3 years ago

1.1.14

3 years ago

1.1.13

3 years ago

1.1.12

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.11

3 years ago

1.1.10

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.3

3 years ago

1.1.0

3 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago