Nondeterministic Polynomial Munchies
Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

walkietalkie

2.0.0 • Public • Published

WalkieTalkie

About

For managining 2-way communication between multiple autonomous entities

Create a channel, then a bunch of 'walkie-talkies', then send and receive events over them!

each walkie-talkie acts like a duplex-emitter

Examples

var WTChannel = require('walkietalkie')
 
var team = WTChannel()
 
var shaggy = team.WalkieTalkie()
var scooby = team.WalkieTalkie()
var daphne = team.WalkieTalkie()
var fred   = team.WalkieTalkie()
var velma  = team.WalkieTalkie()
 
shaggy.on('ruh-oh',function() {
  console.log('zoinks!')
})
 
scooby.emit('ruh-oh')

See tests for more examples

Keywords

none

Install

npm i walkietalkie

DownloadsWeekly Downloads

1

Version

2.0.0

License

none

Last publish

Collaborators

  • avatar