@webhandle/minimal-browser-event-emitter

1.0.4 • Public • Published

webhandle-minimal-browser-event-emitter

The smallest possible node js style event emitter methods over browser event dispatcher code

There's an additional class Streamish which doesn't rely on anything.

Install

npm install @webhandle/minimal-browser-event-emitter

Usage

Intended to be used in a browser.

import EventEmitter from '@webhandle/minimal-browser-event-emitter'

// or
// const EventEmitter = require('@webhandle/minimal-browser-event-emitter').default

let emitter = new EventEmitter()

emitter.on('test', function (one, two, three) {
	// Do something
})

emitter.emit('test', 1, 2, 3)

Readme

Keywords

none

Package Sidebar

Install

npm i @webhandle/minimal-browser-event-emitter

Weekly Downloads

4

Version

1.0.4

License

ISC

Unpacked Size

15.2 kB

Total Files

7

Last publish

Collaborators

  • dankolz