1.0.2 • Published 8 years ago

javascript-observer v1.0.2

Weekly downloads
8
License
MIT
Repository
bitbucket
Last release
8 years ago

License

MIT

Overview

Module for any publish/subscribe handling.

Installation

npm install javascript-observer --save

Public Repository

https://bitbucket.org/sbgorilla/javascript-observer

Example

var jo = require("javascript-observer"); 
var subcription = jo.on("message", function(o){
    console.log("arguments are " + o); 
});

jo.send("message", "some string value"); 
//prints 'arguments are some string value'
subscription.off(); 
jo.send("message", "some string value"); 
//prints 'could not send: some string value'

//NOTE: if a notification needs to be send on subscribe var subscription can also perform send
1.0.2

8 years ago

1.0.1

9 years ago

1.0.0

10 years ago