JSPM

  • Created
  • Published
  • Downloads 5401
  • Score
    100M100P100Q130486F

Node.js events module for Gjs

Package Exports

  • @gjsify/events

Readme

@gjsify/events

GJS implementation of the Node.js events module. Provides EventEmitter, once, on, and listenerCount.

Part of the gjsify project — Node.js and Web APIs for GJS (GNOME JavaScript).

Installation

npm install @gjsify/events
# or
yarn add @gjsify/events

Usage

import { EventEmitter } from '@gjsify/events';

const emitter = new EventEmitter();
emitter.on('data', (msg) => console.log(msg));
emitter.emit('data', 'hello');

Inspirations and credits

License

MIT