Havana event
A simple publish/subscribe pattern.
How to install
npm install havana-event
How to use
At it's most basic:
; const event = ; event; event;
A slightly more complex example:
; const event = ; const token = event; event; event;
ES2015+
Havana event is written using ES2015+ syntax.
However, by default this module will use an ES5 compatible file that has been compiled using Babel.
In the dist
directory there are four files, the default
is event.server.js
. The default when using a client-side
bundler that supports the
browser field
spec is event.browser.js
.
Havana event currently requires the
Babel polyfill.
You are expected to supply this yourself. However, as a
courtesy you will also find event.server.with-polyfill.js
and event.browser.with-polyfill.js
in the dist
directory.