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

/simple-js-observer/

    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