How to use the eventemitter3.default function in eventemitter3

To help you get started, we’ve selected a few eventemitter3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github oasislabs / oasis.js / packages / types / src / eventemitter3.ts View on Github external
import * as _EventEmitter from 'eventemitter3';

let EventEmitter: any = undefined;

// Browser.
/* tslint:disable */
if (typeof window !== 'undefined') {
  // @ts-ignore
  EventEmitter = _EventEmitter.default;
}
// Node.
else {
  EventEmitter = require('eventemitter3');
}

export default EventEmitter;

eventemitter3

EventEmitter3 focuses on performance while maintaining a Node.js AND browser compatible interface.

MIT
Latest version published 2 years ago

Package Health Score

76 / 100
Full package analysis