0.0.4 • Published 4 years ago

@cicadoidea/actor v0.0.4

Weekly downloads
4
License
GPL-3.0-or-later
Repository
github
Last release
4 years ago

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.)

License

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago