simple-js-observer

1.0.1 • Public • Published

simple-js-observer

Simple implementation of observer pattern

const Publisher = require('simple-js-observer');

let pub = new Publisher;

function sub(message){ console.log(message) }

sub.subscribe(pub); // Subscribing

pub.send("Hello!") // Publishing

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    8
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    8
  • 1.0.0
    0

Package Sidebar

Install

npm i simple-js-observer

Weekly Downloads

8

Version

1.0.1

License

MIT

Unpacked Size

2.12 kB

Total Files

3

Last publish

Collaborators

  • abalabekyan