Skip to content

xafans/flare

🔥 Flare

Blazing fast event aggregator for JavaScript & TypeScript
A lightweight, flexible, and type-safe alternative to traditional event emitters.

npm version  License  Build Status


✨ Features

  • 🚀 Blazing fast: optimized for performance.
  • 🛠️ Middleware & interceptors: intercept events before/after firing.
  • 🎯 Strategies: run handlers in parallel or serial.
  • ⏱️ Timeouts & error handling: stop long-running handlers.
  • 🧹 Release: remove specific handlers or all at once.
  • Type-safe: written in TypeScript, works seamlessly in JS & TS projects.

📦 Installation

npm install flare
# or
yarn add flare
# or
pnpm add flare

🚀 Quick Start

import { flare } from "flare";

// Register a handler
flare.catch("userLogin", (user) => {
  console.log(`User logged in: ${user.name}`);
});

// Fire an event
flare.fire("userLogin", { id: "123", name: "Alice" });

⚙️ API


🛠 Development

Clone and build locally:

git clone https://github.com/xafans/flare.git
cd flare
npm install
npm run build
npm test

📜 License

MIT © 2025 xafans

About

A simple but powerful event aggregator for typescript

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Contributors 4

  •  
  •  
  •  
  •