1.2.0 • Published 2 years ago

paper-pusher v1.2.0

Weekly downloads
16
License
MIT
Repository
github
Last release
2 years ago

paper-pusher

Tiny pub/sub messaging component with no dependencies.

Install

npm install paper-pusher

Importing

PaperPusher can be consumed via importing the ES module:

import { PaperPusher } from 'paper-pusher'

Alternatively, a minified distribution file, for use in all modern browsers is available at dist/paper-pusher.min.js

Initialize

const eventSystem = new PaperPusher();

Publish

const eventData = {};
eventSystem.publish('event-name', eventData);

Subscribe

eventSystem.subscribe('event-name', function(eventData) {
    // 'event-name' event emitted, do something...
});
1.2.0

2 years ago

1.1.2

5 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.1-r3

7 years ago

1.0.1-r2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago