Skip to content

Releases: PxPerfectMike/RailJS

v0.1.0 - Initial Release

06 Oct 19:55

Choose a tag to compare

RailJS v0.1.0 - Initial Release

A lightweight event bus for building modular JavaScript applications with strict module isolation.

🎉 First Release

This is the initial production release of RailJS, a simple yet powerful event-driven architecture for JavaScript/TypeScript applications.

✨ Features

  • Module Isolation: Modules communicate exclusively through events, not direct imports
  • Data Safety: Automatic deep cloning prevents unintended side effects between modules
  • Simple API: Familiar event emitter pattern with attach/detach module lifecycle
  • Hot-swappable: Add or remove modules at runtime without restarting
  • Universal: Works in Node.js 14+, Deno 1.0+, and modern browsers
  • TypeScript Support: Full type definitions with generic support
  • Async Support: emitAsync() for async handlers with structured results
  • Performance: 2.4M+ events/sec with cloning, 3.6M+ without
  • Testing-friendly: Built-in waitFor() utility for testing

📦 Installation

npm install railjs-core

🚀 Quick Start

import { Rail } from '@railjs/core';

const rail = new Rail();

// Listen for events
rail.on('user.login', (data) => {
  console.log('User logged in:', data.username);
}, 'auth-module');

// Emit events
rail.emit('user.login', { username: 'john' });

📊 Stats

  • Package Size: 24.3 KB (unpacked: 128 KB)
  • Minified: ~5 KB
  • Test Coverage: 72.6%
  • Tests: 20 passing
  • Build Formats: ESM, CJS, UMD (all with minified versions)

📚 Documentation

🔒 Security

See SECURITY.md for security best practices and vulnerability reporting.

📄 License

MIT License - see LICENSE