@bastienrobert/events
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

Events

Event emitter for all engines

Partially implements the Node.js events module for environments that do not have it, like browsers
Fast & 525B gzipped (because size matters)

Install

npm install @bastienrobert/events

Usage

import EventEmitter from '@bastienrobert/events'

const eventEmitter = new EventEmitter()
eventEmitter.on('foo', bar => {
  console.log(bar)
})
eventEmitter.emit('foo', 'here we go!')

API

See the Documentation. You can check the Node.js EventEmitter docs too, most methods are implemented in this package.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.4
    11
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.4
    11
  • 1.0.3
    0
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @bastienrobert/events

Weekly Downloads

11

Version

1.0.4

License

MIT

Unpacked Size

18.1 kB

Total Files

9

Last publish

Collaborators

  • bastienrobert