@cicadoidea/actor
v0.0.4
Published
Actor model for nodejs.
Downloads
2
Readme
Actor
Actor model for nodejs.
npm install @cicadoidea/actor
Examples
Basic ping-pong
const { actor_t } = require('@cicadoidea/actor/lib/actor')
let a = new actor_t()
a.on('ping', re => {
console.log('a on ping')
re.send('pong', a)
})
let b = new actor_t()
b.on('pong', re => {
console.log('b on pong')
re.send('ping', b)
})
a.send('ping', b) // loop forever
Community
Contributions are welcome, see current TODO list for tasks. (Please add yourself to the AUTHORS list if you made any contributions.)
- We enforce C4 as collaboration protocol.
- Style Guide
- Observe the style of existing code and respect it.
- Code of Conduct