0.1.4 • Published 8 years ago

possum-subscribe v0.1.4

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

possum-subscribe

composed message subscription lifecycle for possums

Installation

npm install possum-subscribe --save

Usage

let machine = possum.config({
    namespace: 'foo',
    initialState: 'a'
})
.props({ channels: ['bar'] })
.states({
    a: {
        'bar.b'(inputType, args) { //came from channel 'bar'  },
        'b' (inputType, args) { // came from channel 'foo' }
    }
})
//publish on namespace channel
postal.publish({ channel: 'foo', topic: 'b', data: { ... } })

//publish on explicit channel
postal.publish({ channel: 'bar', topic: 'b', data: { ... } })

//nothing happens
postal.publish({ channel: 'baz', topic: 'b', data: { ... } })
0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago