1.2.6 • Published 1 year ago

@reneos/pubsub v1.2.6

Weekly downloads
20
License
MIT
Repository
github
Last release
1 year 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

1 year ago

1.2.5

3 years ago

1.2.0

4 years ago

1.2.3

4 years ago

1.2.1

4 years ago

1.1.14

4 years ago

1.1.13

4 years ago

1.1.12

4 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.11

4 years ago

1.1.10

4 years ago

1.1.6

4 years ago

1.1.5

5 years ago

1.1.3

5 years ago

1.1.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago