1.0.2 • Published 8 months ago

@meese-os/event-emitter v1.0.2

Weekly downloads
-
License
BSD-2-Clause
Repository
github
Last release
8 months ago

MeeseOS EventEmitter

This is a EventEmitter implementation for MeeseOS.

API

on("event-name", () => {}); // Fired every time event is emitted
once("event-name", () => {}); // Fires only once and is forgotten
off("event-name", () => {}); // Removes listener
off("event-name"); // Removes all listeners of this type
off(); // Removes all listeners

on("event-name", () => {}, { persist: true }); // Will not be removed unless forced
off("event-name", () => {}, true); // Force removal