pear-message
v1.0.0
Published
Send object messages between a Pear application's processes/threads, pattern matching them with pear-messages
Downloads
2,695
Readme
pear-message
Send object messages between a Pear application's processes/threads, pattern matching them with pear-messages
Usage
import message from 'pear-message'
await message({ some: 'props', to: {pattern: ['match', 'against'] }})Elsewhere in app use pear-messages:
import messages from 'pear-messages'
const stream = messages({ some: 'props' })
stream.once('data', console.log)Should log: { some: 'props', to: {pattern: ['match', 'against'] }}
License
Apache-2.0
